不多废话,直接硬操作。
一、安装
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum install mysql-server
二、启动
systemctl start mysqld
——查看 temporary Password
grep 'temporary password' /var/log/mysqld.log
三、配置
mysql_secure_installation
输入temporary Password,并修改密码
四、远程连接
例如,你想root使用123456从任何主机连接到mysql服务器。
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
远程连接
网友评论