Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Mariadb - unable to connect locally using host=localhost on the second instance (mysqld@2 )

$
0
0
Hello.
I can connect to my mariadb server on the second instance (mysqld@2) on my local network from any workstation using :
Code:

mysql -P 63332 -u postfix_user -p'mysql_pwd' -h 192.168.130.100 mysql
or
Code:

mysql -P 63332 -u postfix_user -p'mysql_pwd' -h LINUX-TEST-123 mysql
I can connect locally on the server using the same commands.
But I am unable to connect using host=localhost.
Code:

mysql -P 63332 -u postfix_user -p'mysql_pwd' -h localhost mysql
                                                                                               
ERROR 1045 (28000): Access denied for user 'postfix_user'@'localhost' (using password: YES)

ther is no anonymous user :
Code:

MariaDB [mysql]> SELECT USER, password, host from user ;
+---------------+------------------------------------------------+----------------+
| USER              | password                                                      | host          |
+---------------+------------------------------------------------+----------------+
| postfix_mysql | *D6C0C2C5A998B36A931E6BDADFF50579D22B5588 | localhost      |
| postfix_mysql | *D6C0C2C5A998B36A931E6BDADFF50579D22B5588 | LINUX-TEST-123 |
| postfix_mysql | *D6C0C2C5A998B36A931E6BDADFF50579D22B5588 | 127.0.0.1      |
| tux_user      |                                                                      | localhost      |
| tux_user      |                                                                      | 127.0.0.1      |
| postfix_mysql | *D6C0C2C5A998B36A931E6BDADFF50579D22B5588 | 192.168.130.%  |
+---------------+-------------------------------------------+----------------+
6 rows in set (0.00 sec)

MariaDB [mysql]> select USER(),CURRENT_USER() ;
+-----------------------------------------+-----------------------------+
| USER()                                                | CURRENT_USER()              |
+-----------------------------------------+-----------------------------+
| postfix_mysql@LINUX-TEST-123.my-dom.nwk | postfix_mysql@192.168.130.% |
+-----------------------------------------+-----------------------------+
1 row in set (0.01 sec)

But if I add the protocol, I can connect
Code:

mysql --protocol=TCP -P 63332 -u postfix_user -p'mysql_pwd' -h localhost mysql

but I can connect on the first instance (mysqld) using the 3 possibilities ( by ip, by host name and using local host.
Code:

]mysql -P 63330 -u mysql_user -p'mysql_pwd' -h 192.168.130.100 mysql
]mysql -P 63330 -u mysql_user -p'mysql_pwd' -h LINUX-TEST-123 mysql
]mysql -P 63330 -u mysql_user -p'mysql_pwd' -h localhost mysql

here is my config :http://paste.opensuse.org/28049382

Any help is welcome.

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>