One: Install MySQL online
1, first detect, MySQL has not been installed before
Command: RPM-QA | grep MySQL
2. Delete mysql command: rpm-e--nodeps ' Rpm-qa | grep MySQL '
3. Install MySQL command online: yum-y install Mysql-server
4. Turn on the MySQL services: Service mysqld start
5. Load the MySQL service to boot entry: Chkconfig mysqld on
6, initialize the configuration of MySQL service
Where is mysql_secure_installation
Execute Script/usr/bin/mysql_secure_installation
7. Access to MySQL service
Mysql-h Master.hive.crxy.cn-uroot-proot
Problem: Host ' 192.168.1.102 ' isn't allowed to connect to this MySQL server
Workaround:
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';(This sentence means: Give all permissions to the root user on any database and all tables on any host)
mysql> flush Privileges;
Second: Install MySQL offline
1°, view MySQL dependencies
Rpm-qa | grep MySQL
2°, delete MySQL dependency
Rpm-e--nodeps ' Rpm-qa | grep MySQL ' or
Rpm-e--nodeps ' Rpm-qa | grep MySQL '
3°, offline install MySQL
RPM-IVH mysql-server-5.1.73-1.glibc23.x86_64.rpm
RPM-IVH mysql-client-5.1.73-1.glibc23.x86_64.rpm
4°, start MySQL service
Service MySQL Start
5°, join to boot startup item
Chkconfig MySQL on
6°, initialize configuration MySQL service
Whereis mysql_secure_installation
Execute Script/usr/bin/mysql_secure_installation
7°, Access MySQL service
Mysql-h Master.hive.crxy.cn-uroot-proot
Problem: Host ' 192.168.1.102 ' isn't allowed to connect to this MySQL server
Workaround:
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';
mysql> flush Privileges;
Install MySQL under Linux (offline installation and online installation)