Access denied to mysql cause by invalid server hostname bind address

Posted by Mark on Server Fault See other posts from Server Fault or by Mark
Published on 2012-12-13T03:04:08Z Indexed on 2012/12/13 5:06 UTC
Read the original article Hit count: 510

Filed under:
|
|
|

I cannot login to mysql using the terminal.

[root@fst mysql]# mysql -h localhost -u admin -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

I am sure I have the correct password. The mysql is also running when I check status. The mysql database is also present in the directory /var/lib/mysql/. The host host.myi, host.myd and host.frm are present.

By the way this a related to question on my previous problem MySQL server quit without updating PID file . Initially the problem arise when the root directory was full. To be able to login to directadmin and start mysql, I added a soft link of the /var/lib/mysql/ to /home/mysql. Since my database used up the most of the root directory. The root directory has 50Gb and /home has 1.5Gb. Somehow the /var/lib/mysql/idbdata1 is corrupted. So I move it to another location.

Now, I can start the mysql server but I cannot login into it.

Below are the contents from the myql logs.

121212 20:44:10 mysqld_safe mysqld from pid file /var/lib/mysql/fst.srv.net.pid ended
121212 20:44:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121212 20:44:10 [Note] Plugin 'FEDERATED' is disabled.
121212 20:44:10 InnoDB: The InnoDB memory heap is disabled
121212 20:44:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121212 20:44:10 InnoDB: Compressed tables use zlib 1.2.3
121212 20:44:10 InnoDB: Using Linux native AIO
121212 20:44:10 InnoDB: Initializing buffer pool, size = 128.0M
121212 20:44:10 InnoDB: Completed initialization of buffer pool
121212 20:44:10 InnoDB: highest supported file format is Barracuda.
121212 20:44:11  InnoDB: Waiting for the background threads to start
121212 20:44:12 InnoDB: 1.1.8 started; log sequence number 1595675
121212 20:44:12 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
121212 20:44:12 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
121212 20:44:12 [Note] Server socket created on IP: '0.0.0.0'.
121212 20:44:12 [Note] Event Scheduler: Loaded 0 events
121212 20:44:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.27-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

I guess there is something wrong with the bind address. How should I fix the problem?

© Server Fault or respective owner

Related posts about linux

Related posts about mysql