标签:com 启动mysql pass 云安全 lis dmi min post systemctl
step1:下载mysql源安装包:wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
step2:安装MySQL源:yum localinstall mysql57-community-release-el7-8.noarch.rpm
step3:检测是否安装完成:yum repolist enabled | grep "mysql.*-community.*"
step4:安装mysql:yum install mysql-community-server
step5:设置开启启动mysql服务:systemctl enable mysqld
step6:启动MySQL服务:systemctl restart mysqld
step7:查看MySQL初始密码:grep ‘A temporary password‘ /var/log/mysqld.log
step8:更改MySQL密码:mysqladmin -u root -p‘step7中的就密码‘ password ‘您的新密码‘
step9:设置mysql能够远程访问:
登录进MySQL:mysql -uroot -p密码
增加一个用户给予访问权限:grant all privileges on *.* to ‘用户名‘@‘ip地址‘ identified by ‘密码‘ with grant option; //可将ip改为%%,表示开启所有的
注意这里需要再阿里云安全组中开放3306端口供公网访问。
完成以上步骤,在公网通过工具连接测试即可
推荐:锌闻网
标签:com 启动mysql pass 云安全 lis dmi min post systemctl
原文地址:https://www.cnblogs.com/98kkkkkkkkkk/p/13357167.html