I'm trying to install a PHP-based tool which connects to a MySQL database, hosted on Ubuntu. I can log into the MySQL database from the command line, but running the app results in this error:
Access denied for user '[user]'@'localhost' (using password: YES)
What I've done: Using guidance from this discussion, here are some troubleshooting steps I've taken.
Trying to connect to MySQL via Telnet results in this garbled nonsense:
$ telnet 127.0.0.1 3306 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. A 5.1.41-3ubuntu12.10XIs(ja&7FyO`r>zpDAY{Connection closed by foreign host.
My /etc/hosts.deny file is empty. I've added the following lines to my /etc/hosts.allow file:
mysqld: ALL : ALLOW mysqld-max: ALL : ALLOW
Although the
bind-address
in my /etc/mysql/my.cnf file was set to127.0.0.1
, I commented it out to no avail.Disable the firewall
Flush privileges
It should be noted that I restarted MySQL after each of these steps using the following command:
mysqladmin -u [user] -p shutdown
mysqld_safe &
What am I missing?