MySQL can connect with localhost, but 127.0.0.1 can't connect

Asked 2 years ago, Updated 2 years ago, 40 views

mysql-uroot-p
If so, it becomes root@localhost and you can connect, but

mysql-uroot-p-h 127.0.0.1

Access denied for user 'root'@'127.0.0.1' (using password:YES)
Unable to connect next to

What I want to do is connect from SeaquelPro to sql

mysql

2022-09-30 11:34

1 Answers

Mysql sets permissions and passwords in units of とuser name@hostname 」.
https://dev.mysql.com/doc/refman/5.6/ja/account-names.html

Also, localhost and 127.0.0.1 are treated differently in mysql and behave differently.
(In the case of localhost, it is socket communication) https://dev.mysql.com/doc/refman/5.6/ja/can-not-connect-to-server.html

In other words,
If only root@localhost was configured with a password or permissions,
[email protected] is undefined.


2022-09-30 11:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.