Steps:
1) View The MySQL that comes with CentOS
Input Rpm-qa | grep MySQL
2) Uninstall your own MySQL
3) upload MySQL to Linux
4) install mysql dependency (optional)
Yum-y Install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
Yum Update libstdc++-4.4.7-4.el6.x86_64
5) unzip MySQL to/usr/local/under MySQL directory (MySQL directory needs to be created manually) within
Cd/usr/local
mkdir MySQL
TAR-XVF mysql-5.6.22-1.el6.i686.rpm-bundle.tar-c/usr/local/mysql
6) install MySQL under/usr/local/mysql
Install server side:RPM-IVH mysql-server-5.6.22-1.el6.i686.rpm
Install client:RPM-IVH mysql-client-5.6.22-1.el6.i686.rpm
7) start MySQL
Service MySQL Start
8) add MySQL to the system service and set the boot up
Join the system service:chkconfig--add MySQL
Auto Start:chkconfig MySQL on
9) Log in to MySQL
MySQL will generate a temporary random password when it is installed, and the storage location is/root/.mysql_secret.
Msyql–u root-p
Modify the MySQL password
Set password = password (' root ');
One) open remote login for MySQL
MySQL is not supported by default in MySQL for security purposes, so you need to set the right to log on to MySQL remotely .
After logging in to MySQL, enter the following command:
Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';
Flush privileges;
Port 3306 for external access to open Linux
/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
/etc/rc.d/init.d/iptables Save---Persist changes to the firewall
MySQL installation in Linux