sudo apt-get update #更新源 sudo apt-get install mysql-server #安装 systemctl status mysql
GRANT ALL ON *.* TO 'root'@'%' update user set host = '%' where user = 'root'; update user set host = '%' where user = 'root' and host='localhost'; GRANT ALL ON *.* TO 'root'@'%' flush privileges; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
CREATE USER 'mycompany'@'%' IDENTIFIED BY 'mycompany'; ALTER USER 'mycompany'@'%' IDENTIFIED WITH mysql_native_password BY 'mycompany'; flush privileges;
MySQL8创建、删除用户和授权、消权
https://blog.csdn.net/qq_43278247/article/details/108883177
MySQL8允许远程连接
vi /etc/mysql/my.cnf 添加 [mysqld] port=3306 bind-address=0.0.0.0 service mysql restart
mysql 8 设置允许远程连接 You are not allowed to create a user with GRANT
https://blog.csdn.net/mxskymx/article/details/88765072
Your password does not satisfy the current policy requirements
https://blog.csdn.net/zhanaolu4821/article/details/93622812
MySQL常用语句一、连接MySQL格式:mysql-h主机地址-u用户名-p用户密
https://blog.csdn.net/weixin_44797182/article/details/90639195