标签:adb gre pre 连接 for 成功 query select 进入
ps -ef | grep mysql
cd /usr/local/mariadb10/bin/
./mysql -uroot -p
update user set host = '%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
提示有错误,直接查看修改结果:
MariaDB [mysql]> select host,user from user;
+-----------+------+
| host | user |
+-----------+------+
| % | root |
| 127.0.0.1 | root |
| ::1 | root |
+-----------+------+
3 rows in set (0.001 sec)
证明修改成功了。
再次修改数据库密码以防止无法登陆问题 (ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
)
MariaDB [mysql]> set password for root@'%'=password('123456');
Query OK, 0 rows affected (0.001 sec)
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
退出登录,远程连接验证
标签:adb gre pre 连接 for 成功 query select 进入
原文地址:https://www.cnblogs.com/baily/p/11845446.html