当前位置:网站首页>Centos8 creates wordpress+mysql error reports according to the official website of docker
Centos8 creates wordpress+mysql error reports according to the official website of docker
2022-07-28 18:11:00 【Ripo_ za】
The article of this film is the last
The operating system is centos8, Better not use this .
And then according to Official website installation wordpress course do , Exactly the same as , Visit the website after installation .
Error establishing a database connection.
I can't find a lot of solutions on the Internet , Used to docker-compose up -d Starting up , So you can't see the error , use docker-compose up After starting , You can see the error prompt 
If you encounter the same problem, you can refer to This web site , Many people inside gave advice .
1、 First determine centos Whether the port of is open , Reference resources This
2、
I changed it wordpress Under the container wp-config.php The file is successful .
Refer to the following screenshot , But change it directly wp-config file , After restarting the container, it will become and docker-compose The file is the same , In the figure below, the author also said that this is not a good solution , It's better to change docker-compose Document bar . See the original text for details .
The gateway address in the figure can be obtained through the following command .
The gateway address is used here , no need ip Address .
It's over wp-config.php After that, it is easy or docker service , It will take effect directly . restart docker It changed back .
Postscript :
After understanding , I think it's my computer , Official website docker-compose The document must be ok , I can use the official website now , But I'm not sure what caused the mistake in the first place . Maybe some of these attempts lead to the normal operation of the current .
If this error occurs , The first firewall Stop , Then restart docker service , Or change the mount directory , Recreate docker-compose up -d once , It may also be a problem with the previous configuration .
1、sudo systemctl disable firewalld
2、systemctl restart docker
About why to change db Just look for the gateway This blog .
边栏推荐
- 个人制作:AD库、元件库、封装库及3D模型,免费
- Dormant for two years! Lingsheng technology's first aiot chip released: Samsung 11nm process, integrated NPU core!
- Video number from 2-3 games per week to 3 games per day
- 视频号更像是2.0版的公众号
- Openmv (V) -- STM32 to realize face recognition
- Characteristics required for making a good video Number
- 10.8亿美元!TCL科技收购三星苏州8.5代线:未来一年产能将增长60%!
- Tensorflow2.0 (XII) -- realize simple RNN and LSTM networks
- 概率函数P(x)、概率分布函数F(x)与概率密度函数f(x)的区别
- Changjiang storage launched its own storage brand "Zhiti", and the first SSD product was exposed
猜你喜欢

Personal production: ad library, component library, packaging library and 3D model, free of charge

Flutter:异常处理

“云战略”将成为企业数字化转型的重要支柱

centos使用docker运行mysql后,远程连接需要开放端口

Openmv (IV) -- STM32 to realize feature detection

2023年网络安全预算规划的五个关键考虑因素

如何简简单单地自己动手磨刀

物联网在智慧城市的应用
![[dry goods] how to establish a close relationship between support and products?](/img/ec/bc36beb0935968fec3791910e2cb0a.png)
[dry goods] how to establish a close relationship between support and products?

数字滤波器(二)--最小相位延时系统和全通系统
随机推荐
[dry goods] how to establish a close relationship between support and products?
The growth path of hardware engineers (0) -- Understanding components
美国对华为禁令开始波及欧洲芯片厂商
Domain name resolution problem record
The US ban on Huawei began to affect European chip manufacturers
Digital filter (V) -- design IIR filter
wordpress提示建立数据库连接时出错
体验5分钟开发微信小程序
This tool is enough for video number operation
$(document).Width() in WebView is a value
[reading notes] - 2 learn machine learning classification through naive Bayesian model
【无标题】
Digital filter (I) -- basic structure and matlab implementation of IIR and fir
Tips -- understanding of the physical meaning of convolution
Image processing code sorting
The video number is more like a official account of version 2.0
视频号小白起号操作指南
Personal production: ad library, component library, packaging library and 3D model, free of charge
做好视频号需要的特质
Apple supplier JDI plans to sell Baishan LCD plant and equipment for us $675million