Reputation: 10631
I am using Linux Mint Olivia. Recently i have installed Wordpress on my local apache server (Lamp). It was working fine but when i restarted my computer and tried to connect to local server it kept showing following message
Error establishing a database connection
After spending few hours, i have understood that this error occurred because of IP address of my machine changed every time i re-connect to Internet.
bind-address = 192.***.**.**
So whenever i tried to connect web server from browser , i have to edit /etc/mysql/my.cng
files and change
bind-address to new IP address.
How can i fix this problem so that /etc/mysql/my.cng file automatically keep track of new IP address.
Thanks
Upvotes: 0
Views: 432
Reputation: 24116
Don't bind the LAN ip address to your mysql server setup. Comment that line out. This way, you can setup your wordpress to connect to mysql server "localhost" or "127.0.0.1" local loopback address.
Or
Fix your network adapter to one of the 192.xxx ip you get from DHCP, so that it doesn't change on reconnect.
Upvotes: 1