mysql5.7 remote centos server installation

Installation environment: a new system centos 7

First, go to the directory / home and create a new folder inside the folder used to store the next step is to download the mysql yum repository

Just into the new folder, type the command

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

Type the installation after the download is complete

yum -y install mysql57-community-release-el7-10.noarch.rpm

Then you can use yum install myqsl, and type

yum -y install mysql-community-server

To start the download and installation, the installation is complete, type

systemctl start mysqld.service

Used to start the MySQL service, this version of the root user will generate a random password, use the command

grep "password" /var/log/mysqld.log

After viewing the password with the command

mysql -uroot -p

Just enter the password to view it successfully entered into the mysql (password might have colon so do not enter the content only after the colon)

Finally, change what the root password to use the database, type the command

alter user 'root'@'localhost' identified by 'NewPassword‘;

Password To contain uppercase and lowercase letters as well as numbers and special characters, will complain too simple, set up after the success can use the database.

Guess you like

Origin www.cnblogs.com/Wszhurui/p/11567302.html