*** /etc/my_init.d/40_firstrun.sh failed with status 255 Starting Apache httpd web server apache2Ĭompilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.īEGIN failed-compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.Ĭompilation failed in require at /usr/bin/ line 34.īEGIN failed-compilation aborted at /usr/bin/ line 34.Starting MariaDB database server mysqldĭBI connect('database=zm host=localhost','zmuser'.) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Config.pm line 117.Ĭan't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.īEGIN failed-compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.Ĭompilation failed in require at /usr/bin/ line 71.īEGIN failed-compilation aborted at /usr/bin/ line 71.Jan 31 22:01:26 galacticempire /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read.Invoke-rc.d: policy-rc.d denied execution of start. usr/sbin/policy-rc.d returned 101, not running 'restart rvice' NOTE: MySQL/MariaDB not running please start mysql and run dpkg-reconfigure zoneminder when it is running. usr/sbin/policy-rc.d returned 101, not running 'start rvice' usr/sbin/policy-rc.d returned 101, not running 'stop rvice'įailed to connect to bus: No such file or directory Invoke-rc.d: policy-rc.d denied execution of stop. Invoke-rc.d: could not determine current runlevel Setting shared memory to : 50% of 16294700 bytes If you are using dockerfile to create mysql container then use these following 2 lines in it FROM mysql:5.7.I'm trying to run dlandon/zoneminder through your docker-run.sh script as root but always get the same errors and then it get closed. You can remove all files that the server added to it.Ĭreate a user in a docker container which have chown and chmod permissions to the dir /var/lib/mysql/. The designated data directory /var/lib/mysql/ is unusable. so that docker container can access it.Īnd One more thing give permission to the docker container dir also, that is showing in your error so give admin permission to this location or you can create a docker user chown and chmode.īasically give permission to the host machine directory. So basically if you are using mysql:5.7 then upgrade to mysql:5.7.16.Īnd if this doesn't help then I have one more solution.īasically the problem is you are sharing dir to container -v /mnt/wayne/mysql:/var/lib/mysql/ but you ubuntu is not giving permission to access the /mnt/wayne/mysql dir. Okay, I tried this and google also, what I found is Try to change the permissions of your volume/mount point, for example: chmod -R 777 /your/volume/mount_point If you run into the same "permissions" problem: mysqld: Cannot change permissions of the file 'ca.pem' (OS errno 1 - Operation not permitted) Then to bring up the container I use: $ docker-compose upįrom the docker-compose.yml has you can see I use port 13306 therefore for testing/connection I use: $ mysql -h 127.0.0.1 -P13306 -uroot -pĪll the data (databases) will be in /your/path/mariadb/db In the same directory, I have the volume directory /your/path/mariadb/db This is the content of the /your/path/docker-compose.yml file: -Ĭommand: -transaction-isolation=READ-COMMITTED -binlog-format=ROW This is not exactly with MySQL but I hope it can give you an idea, I basically use this for testing against a MySQL database from my local environment, for this I use docker-compose and MariaDB, I configure the "data-dir" as a volume so that I can stop/start the docker container without the need to "seed" every time the database. T21:43:31.947298Z 0 /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.20) MySQL Community Server - GPL. You can remove all files that the server added to it. T21:43:29.852970Z 0 The designated data directory /var/lib/mysql/ is unusable. T21:43:29.851875Z 0 Could not set file permission for ca.pem Mysqld: Cannot change permissions of the file 'ca.pem' (OS errno 1 - Operation not permitted) T21:43:25.281460Z 1 InnoDB initialization has started. T21:43:25.253898Z 0 /usr/sbin/mysqld (mysqld 8.0.20) initializing of server in progress as process 22 How do I fix sudo docker run -it -p 3306:3306 -e MYSQL_ROOT_PASSWORD=admin -v /mnt/wayne/mysql:/var/lib/mysql/ -name mysqlserver mysql/mysql-server MySQL Docker Image 8.0.20-1.1.16 I am trying the following docker run command, but I'm having issues with permissions. I want to use a mounted network share for the data directory. I'm running docker in Ubuntu and trying to create and run a MySql container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |