我有一个linux,我可以使用命令行连接到它。
root@vps27625:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4604
Server version: 5.5.38-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>但是,如果我使用任何sql客户端,则会引发错误1045,拒绝用户根的访问(使用密码: YES)
发生这种情况的可能原因是什么?
发布于 2014-08-23 00:47:09
好像你远程使用根。默认情况下,mysql的大多数安装都否认这一点。因此,使用其他用户代替。
实际上,使用根帐户进行远程登录并不是很好的做法。
发布于 2014-08-23 11:51:29
mysql服务器上根用户的远程登录被禁用。您可以使用
> mysql_secure_installation
命令来启用或禁用它。
https://stackoverflow.com/questions/25457318
复制相似问题