Record operating a pit father. A long time ago, mysql installation is very smooth, and thus, along experience in the mysql8.0 hit the pit, blame, too old, too old experience, bringing updated as follows:
linux install mysql, the latest version 8.0:
1, first of all, to detect whether or not already installed:
rpm -qa | grep mysql
Delete mysql installed:
-e RPM - nodeps MySQL or rm -rf xxx
2, installation, landing mysql official website , download the corresponding version of YUM Resource Kit .
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
yum install mysql-server
initialization,
mysqld --initialize
start up,
systemctl start mysqld
stop,
systemctl stop mysqld
Restart,
systemctl restart mysqld
3, filled pit
1), you will be prompted after the start: the Job for mysqld.service Because at The failed The Control Process the Exited with error code See "systemctl Status mysqld.service" and "journalctl -xe" for the Details.. You see this error, the first reaction, according to a presentation,
systemctl status mysqld.service or journalctl -xe command,
Review the information and results obtained with want, far:
To suggest that the final point Error: 13 (Permission denied). . . . Failed to start MySQL Server no eggs used, and thus, view the mysql error log: execution c Reviewing log that, mysqld.pid not have write permission to take the following ways to solve:
chown -R mysql:mysql /var/run/mysqld
Started again, success!
2), set a password for the root user
According to previous experience, meal operate fierce as a tiger, a closer look, root password is still the place! (Outdated experience, not repeat them)
regret the original, not carefully Tell me what network documentation, thus, read the official to obtain the following ways: Execute the following command:
shell> sudo grep 'temporary password' /var/log/mysqld.log
得到mysql安装启动时,提供得临时密码xxx
通过临时密码,执行shell> mysql -uroot -p,输入临时密码,登陆mysql成功
执行以下命令:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxxx';
设置新密码成功!
注:新密码遵循mysql的密码策略。密码策略validate_password
要求密码包含至少一个大写字母,一个小写字母,一个数字和一个特殊字符,并且总密码长度至少为8个字符
至此,mysql8.0填坑初步完成。