stduolcK零S
从pod内,可以ping mysql的域名,解析正常。
日志说明,mysql连接地址是127.0.0.1.
从pod内,可以ping mysql的域名,解析正常。
日志说明,mysql连接地址是127.0.0.1.
这里是我在容器里面 cat 的 wp-config.php。
设置了 WORDPRESS_DB_HOST 为 mysql。 我用debugger pod测试,执行
mysql -h mysql -u root -p
一样连接的是 127.0.0.1
依照最新的文档 https://kubesphere.com.cn/docs/quick-start/wordpress-deployment/ 安装wordpress也连接不上mysql数据库
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.227.209. Set the 'ServerName' directive globally to suppress this message
echo "ServerName 192.168.227.209" >> /etc/apache2/apache2.conf
. /etc/apache2/envvars
apache2 -k restart
poker 重新创建wordpress 就可以了