1.1. Installing MySQL under Linux
First step: Check if MySQL is installed.
Rpm-qa|grep MySQL
Step two: If the MySQL version is not the desired version. Need to uninstall MySQL.
Yum remove MySQL mysql-server mysql-libs mysql-common
Rm-rf/var/lib/mysql
Rm/etc/my.cnf
Step three: Install MySQL. You need to install with the Yum command. You need to install MySQL download source before installing MySQL. Need to be downloaded from Oracle's official website.
1) Download the source package for MySQL.
Mine is centos6.4. The corresponding RPM package is: mysql-community-release-el6-5.noarch.rpm
2) Install MySQL download source:
Yum Localinstall mysql-community-release-el6-5.noarch.rpm
3) Install MySQL online:
Yum Install Mysql-community-server
Fourth step: Start MySQL
Service mysqld Start
Fifth step: You need to set a password for the root user.
/usr/bin/mysqladmin-u root password ' new-password '//Set password for root account
Sixth step: Remote connection authorization.
GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;
Note: ' MyUser ', ' mypassword ' need to be replaced with the actual user name and password.
Install MySQL under Linux