学堂 学堂 学堂公众号手机端

MySQL 8 远程 root 访问(qbit)

lewis 5年前 (2020-06-14) 阅读数 7 #技术
环境
OS: Ubuntu 20.04
MySQL: 8.0.30
步骤
mysql -u root
mysql> use mysql;
# 查看账号信息
mysql> select user, host, authentication_string from user;
# 设置任意 ip 可使用 root 连接
mysql> update user set host='%' where user='root';
# 设置密码为 xxxx
grant all privileges on *.* to 'root'@'%' identified by 'xxxx' with grant option; 
本文出自 qbit snap

版权声明

本文仅代表作者观点,不代表博信信息网立场。

热门