In a web browser, visit mysql.com page:

https://dev.mysql.com/downloads/repo/yum/

Locate the desired version, and update it as needed in the link below:

在Centos 7 上面 安装MySQL 5.7 简录

Execute the following command

  dnf install mysql-server

enable mysql services:

  systemctl enable mysqld

start mysql services

  systemctl start mysqld

In Percona 5.7, the temporary password is stored in /var/log/mysqld.log so you can find it by:

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

After that, you can start mysql

  sudo systemctl start mysql
  sudo /usr/bin/mysql_secure_installation

and use your temporary password to use.

stop mysql service

  systemctl stop mysqld

view mysql status

  systemctl status mysqld

using the new amysql 5.7

  use mysql;
  select user,host from user;  

  drop user 'root'@'localhost';
  CREATE USER 'admin'@'%' IDENTIFIED BY 'you password';

  GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%'  IDENTIFIED BY 'you password';

  FLUSH PRIVILEGES;

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-04-14
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2021-07-13
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案