1. uninstall MySQL:
1. Check whether MySQL is installed before.
# Rpm-Qa | grep-I MySQL
2. uninstall MySQL
# Yum remove MySQL
3. Delete related packages
# Yum remove package name
Ii. Install MYSQL:
Http://dev.mysql.com/downloads/mysql/
Install the MySQL server:
Rpm IVH MySQL-server-5.6.11-2.el6.i686.rpm
Install the mysql client:
Rpm IVH MySQL-client-5.6.11-2.el6.i686.rpm
1. Installation
# Rpm-IVH MySQL-server-5.6.11-2.el6.i686.rpm
# Rpm-IVH MySQL-client-5.6.11-2.el6.i686.rpm
2. Check whether the MySQL service is enabled:
# Netstat-Nat
if it is enabled, a port number is 3306. If it is not enabled, use Service MySQL start to start MySQL service
3. logon and troubleshooting
# mysql-uroot-P
enter password:
error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: No) solution to this error
# service MySQL stop
# mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# mysql-u root MySQL
mysql> Update user SET Password = PASSWORD ('root ') where user = 'root';
mysql> flush privileges;
mysql> quit
# service MySQL start
to add a MySQL account with original access (enter the MySQL Command Line ):
grant all privileges on *. * To test @ "%" identified by "123456" with grant option;
If the mysql5.6 operation reports an error: You must set password before executing this statement solution, execute the following statement
mysql> SET Password = PASSWORD ('root');