I know that there are similar questions, but I didn't find exactly what I'm looking for. Here's what happens and it's kinda strange:
[root@xxx xxx]# mysql -u profuser -ppwd -h 192.168.1.99
ERROR 1045 (28000): Access denied for user 'profuser'@'192.168.1.99' (using password: YES)
And 192.168.1.99
is my own IP. But when I use localhost
or 127.0.0.1
, it's OK:
[root@xxx xxx]# mysql -u profuser -ppwd -h 127.0.0.1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 68
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> bye
[root@xxx xxx]# mysql -u profuser -ppwd -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
I found this question, but it didn't help:
mysql> select host from user where user='profuser';
+--------------+
| host |
+--------------+
| 127.0.0.1 |
| 192.168.1.99 |
| localhost |
+--------------+
I added my IP, as advised in the other question.