您现在的位置: 主页 > 上位机技术 > 数据库 > 无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116
本文所属标签:
为本文创立个标签吧:

无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116

来源: 网络用户发布,如有版权联系网管删除 2020-04-17 

无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116 无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'loadb116' (using password: YES)
上例中loadb116是主机名.
解决方法:
1、这时可以使用:mysql -u root -p 登录,进入到mysql后。
mysql> grant all privileges on *.* to 'root'@'loadb116'
identified by '123456' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
2、在本地使用ip地址登录
# mysql -u root -p -h 192.168.5.116
Enter password:
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 60
Server version: 5.1.45 MySQL Community Server (GPL)

Type 'help;' or '/h' for help. Type '/c' to clear the buffer.

mysql>


              查看评论 回复



嵌入式交流网主页 > 上位机技术 > 数据库 > 无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116
 

"无法在本地登录mysql(如:#mysql -u root -p -h 192.168.5.116"的相关文章

网站地图

围观()