Restarting existing MySQL Docker container
Posted by: Magnus Ljungkrantz
Date: August 12, 2020 04:03AM

I had an MySQL container running in Docker (for use by Zabbix). According to my notes, I started it like this:

docker run --detach --name=my-mysql --env="MYSQL_ROOT_PASSWORD=XXXXXXXX" --publish 6603:3306 --volume=/root/docker/test-mysql/conf.d:/etc/mysql/conf.d mysql

After the VMWare ESXi server was restarted, the container is no longer running. If I start the existing container from Portainer, it starts OK but stops again. The log says:


2020-08-12 08:54:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started.
2020-08-12 08:54:00+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-12 08:54:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started.
mysqld: [Warning] World-writable config file '/etc/mysql/my.cnf' is ignored.
mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2 - No such file or directory)
2020-08-12T08:54:01.111283Z 0 [ERROR] [MY-010095] [Server] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files
2020-08-12T08:54:01.111305Z 0 [ERROR] [MY-010119] [Server] Aborting


Is it wrong to expect to be able to start an existing container? Any ideas how I can solve this problem?

Options: ReplyQuote


Subject
Written By
Posted
Restarting existing MySQL Docker container
August 12, 2020 04:03AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.