Im pretty new to Docker and Kitematic. I was hoping some of you could help me out finish setting up my WordPress dev environment using Kitematic. I’ve installed the official MySQL and WordPress containers.
I have both container running but when launching the WordPress container the log shows:
Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
Warning: mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in - on line 10
MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
It repeats this a few times and finally the container halts. My current config for the WordPress container looks like this: WordPress Container config
I must likely failing at some crucial step, but can’t figure out which one.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'password');
/** MySQL hostname */
define('DB_HOST', 'wordpressdb');
Shouldn’t I have to run a PHP server also, or is that part of the main VM Kinematic launches?
The mysql container need to be linked to the wordpress container.
So open wordpress container terminal and type cat /etc/hosts and you should see something like x.x.x.x wordpressdb if they linked.
I’m having the same problem.
Can you please post the exact syntax I need to enter in Terminal to link MySQL and WordPress?
By the way, why isn’t this done by default?
Thanks!