Hi Everyone, I have just installed Ubuntu and setup Apache, PHP and MySQL using the Terminal, I cannot seem to get MySQL working at all nothing is recognising it, I cant find 'bind-address = 127.0.0.1' in the my.cnf file to change to the servers IP like websites are telling me
Some output of the errors you're receiving would be helpful in fixing the problem.
Run /etc/init.d/mysql and post the results. Also post your mysql config file for us to look at.
I have this in my my.cnf file:
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
If you don't have this in your my.cnf file, you can just add it in and then try restarting mysql
If it's running, then you'll see that if you run netstat and grep for 3306, which is the default port for mysql:
root@ubuntu-monitoring:/etc/mysql# netstat -an | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
You'll also be able to telnet to it and get some kind of response:
root@ubuntu-monitoring:/etc/mysql# telnet 127.0.0.1 3306
Connected to 127.0.0.1.
Escape character is '^]'.
I would suggest keeping it just bound to 127.0.0.1 if you're just going to query it from Apache if it's hosted on the same machine. No sense in having it listen on the public interface unless you want outsiders trying to connect to it.
There are currently 1 users browsing this thread. (0 members and 1 guests)