Mysql yum installation, mysqlyum
Reference: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories
Today, I sorted out the testing machine at the company and tried to install mysql with yum. I thought it was a very simple task. The problem still occurred and I recorded my own processing process, avoid detours for others.
I. Installation Problems:
First enter: http://dev.mysql.com/downloads/repo/yum/ download interface, get the rpm address
Select yum to download:
2. Download the rpm corresponding to redhat 6
Right-click to save as connection address:
Download this rpm server from a linux Server:
wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Install repository locally
sudo yum localinstall mysql-community-release-el6-5.noarch.rpm
After the operation is complete, no software is installed on the server. So we have to install MySQL Server:
sudo yum install mysql-community-server
Mysql installation path:/var/lib/mysql
Theoretically, mysql can be started after this step is completed.
sudo service mysqld start
However, I reported an error when I started it.
View error logs:
cat /var/log/mysqld.log
The three files are redundant and are deleted directly. Restart and the deletion path is as follows:
Then log on directly. (The default account and password are both root and root)
This is even if it is installed.
Ii. Remote Logon
When I use a third-party remote connection, an error is reported. Check and find two root users, one of which is bound to the Local Machine (127.0.0.1) for logon.
So try to change all root passwords:
mysql> use mysql;
mysql> UPDATE user SET password=password("root") WHERE user='root';
mysql> flush privileges;
mysql> exit;
Then you can log on to the console.
Remote connection failure:
Reference: http://blog.csdn.net/sctq8888/article/details/7446906
sudo service mysqld start