CentOS 7.3 安裝MySQL 5.7教學

Add New Repository

yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

Install MySQL 5.7

yum -y install mysql-community-server

Start MySQL and Enable Start at Boot Time

systemctl start mysqld
systemctl enable mysqld

systemctl is-enabled mysqld #check is enabled

Configure the MySQL Root Password

grep 'temporary' /var/log/mysqld.log

mysql -u root -p
#type your password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Your_New_Password';
flush privileges;
exit;

Testing

#re-login mysql
mysql -u root -p
#type your new password

create database yo;
© 版權聲明
THE END
喜歡就支持一下吧
點讚0 分享
評論 搶沙發
头像
歡迎您留下寶貴的見解!
提交
头像

暱稱

取消
暱稱表情代碼圖片