Mysql5.5 installation

1 Download the rpm package of mysql 5.5 version



 2 Upload
the package file through the upload tool to the directory you want to follow for example ( /usr/local )

 

3 xshell tool command to enter the directory



 

4. Run the command 



 

 

5If the following screen or a similar screen appears



 

It means that the Linux system has its own Mysql  and needs to uninstall the original version of mysql: execute the command

 

Uninstall Mysql 

 yum remove mysql mysql-server mysql-libs compat-mysql51

rm -rf /var/lib/mysql 
rm /etc/my.cnf
to see if there is still mysql software:
rpm -qa|grep mysql
continue to delete if there is any



 

Then execute the previous installation statement



 

6 The following screen appears, indicating that the installation is successful . At this time , the Mysql Server installation is successful. Change the password of mysql

Enter the /usr/bin directory to execute 



 

 

 

'new --password' to your own password.

then exit to exit

7 Copy usr/share/mysql/my-medium.cnf to the /etc directory and change the name to my.cnf

 

Then add the red arrow configuration in my.cnf (this is for versions after 5.5 , because mysqld does not recognize the default-character-set variable after version 5.5 )



 

 

 

 

8. After modifying the configuration file, execute the following command (set the navicat for mysql connection password)

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

 

9 . Modify the firewall configuration to release port 3306 ( modify the /etc/sysconfig/iptables file service iptables restart firewall restart )

 

After completing the above steps, Mysql is installed. At this time, you can use navicat for mysql to link the database you installed.

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326703589&siteId=291194637