Centos rpm安装mysql5.7步骤

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-community-server

  • 先启动: service mysqld start
  • 然后查看root用户密码: grep ‘temporary password’ /var/log/mysqld.log
  • 登陆: mysql -uroot -p
  • (可选择)更改密码: set password for 用户名@localhost = password(‘新密码’);
  • 重启: service mysqld restart
  • 停止: service mysqld stop
  • 退出: exit;

发表评论

电子邮件地址不会被公开。 必填项已用*标注