🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
安装mysql: ``` yum install mysql-server ``` ``` systemctl list-unit-files|grep mysqld #检查是否已经设置为开机启动MySQL服务 ``` ``` systemctl enable mysqld.service   #设置开机启动 ``` ``` systemctl start mysqld.service #启动服务 ``` ``` /usr/bin/mysql\_secure\_installation #设置密码 ``` 设置mysql远程连接,进入mysql: ~~~ mysql -u root -p use mysql; update user set host='%' where user='root'; flush privileges; #刷新权限 ~~~ 其他: ``` select user, host from user; # 查看mysql的所有用户 ``` 参考: https://www.cnblogs.com/ttrrpp/p/12173562.html