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)

猜你喜欢

转载自www.cnblogs.com/httpssl/p/10994145.html
今日推荐