mysql 远程连接有问问题,无法连接

  0X01:

                root@kali:~# mysql -h 192.168.7.106 -u root

                ERROR 1045 (28000): Access denied for user 'root'@'192.168.7.108' (using password: NO)

      0X02(解决方法):

    mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

    0X03:查看

    

    MySQL [mysql]> select user,host from user;
    +------------------+----------------+
    | user | host |
    +------------------+----------------+
    | root | % |
    | root | 127.0.0.1 |
    | | localhost |
    | debian-sys-maint | localhost |
    | root | localhost |
    | | ubuntu804-base |
    | root | ubuntu804-base |
  +------------------+----------------+
  7 rows in set (0.00 sec)

posted @ 2019-06-09 17:42  无聊的菜鸟  阅读(368)  评论(0编辑  收藏  举报
CopyRight 2020-2021