Answer the question
In order to leave comments, you need to log in
CMS doesn't see MySQL in Docker container?
I set out to launch the site when MySQL is in the Docker container.
Available:
Docker container:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
38890df7ee0b mysql/mysql-server:5.7 "/entrypoint.sh mysq…" 13 hours ago Up 13 hours (healthy) 33060/tcp, 127.0.0.1:3310->3306/tcp mysql
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
mysql> show grants for 'mto'@'localhost';
+------------------------------------------------------+
| Grants for [email protected] |
+------------------------------------------------------+
| GRANT USAGE ON *.* TO 'mto'@'localhost' |
| GRANT ALL PRIVILEGES ON `mto`.* TO 'mto'@'localhost' |
+------------------------------------------------------+
2 rows in set (0.00 sec)
mysql> show grants for 'mto'@'%';
+----------------------------------------------+
| Grants for mt[email protected]% |
+----------------------------------------------+
| GRANT USAGE ON *.* TO 'mto'@'%' |
| GRANT ALL PRIVILEGES ON `mto`.* TO 'mto'@'%' |
+----------------------------------------------+
2 rows in set (0.00 sec)
mysql -umto -h127.0.0.1 -P3310 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql -umto -h127.0.0.1:3310 -p
Enter password:
ERROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:3310' (2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question