CentOS 6.4 RPM installation MySQL-5.6.22-1
Install MySQL at CentOS 6.4 RPM
1. Uninstall the original mysql
Because the mainstream Linux systems are basically integrated with mysql Databases
Run the following command to check whether the mysql database has been installed on our operating system:
[Root @ bkjia ~] # Rpm-qa | grep mysql // This command will check whether the mysql database has been installed on the Operating System
If yes, run the rpm-e command or the rpm-e -- nodeps command to uninstall it.
[Root @ bkjia ~] # Rpm-e mysql // normal deletion Mode
[Root @ bkjia ~] # Rpm-e installed packages and library files-nodeps mysql // strong deletion mode. If you use the preceding command to delete files, other dependent files are prompted, you can use this command to forcibly delete it.
Delete all
After deletion, run the rpm-qa | grep mysql command to check whether mysql has been uninstalled successfully !!
Ii. download the latest Mysql
Http://dev.mysql.com/downloads/mysql/ open URL: Select Platform: Select Linux-Generic
Iii. Installation
Tar-xf MySQL-5.6.22-1.linux_glibc2.5.x86_64.rpm-bundle.tar
Rpm-ivh MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm MySQL-devel-5.6.26-1.linux_glibc2.5.x86_64.rpm
Wait until installation is complete
Start mysql Service
Service mysql start
Starting MySQL ...... SUCCESS!
If centos fails to be started, check
/Etc/selinux/config
Set SELINUX = enforcing
SELINUX = disabled
Enter mysql
When the newly installed mysql enters the mysql tool, there is always an error message:
# Mysql-u root-p
Enter password:
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)
Or
# Mysql-u root-p password 'newpassword'
Enter password:
Mysqladmin: connect to server at 'localhost' failed
Error: The 'Access denied for user' root' @ 'localhost' (using password: YES) 'method is simple, as follows:
#/Etc/init. d/mysql stop
# Mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking
New SSH window
# Mysql-u root mysql
Prompt to enter the password and press enter to enter
Use mysql
Mysql> UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root' and host = 'root' or host = 'localhost '; // change all empty user passwords to non-empty ones.
Mysql> flush privileges;
Mysql> quit #/etc/init. d/mysqld restart
# Mysql-uroot-p
Enter password: <Enter the new password newpassword>
MySql5.6 operation error: You must set password before executing this statement solved
Mysql> set password = PASSWORD ('20140901 ');
Query OK, 0 rows affected (0.03 sec)
That is, use mysql> set password = PASSWORD ('123'); in this case, reset the PASSWORD!
Set automatic start of MySQL at startup
Chkconfig mysql on
The setting is successful.
The following is the MySQL-related content carefully selected by the editor to see if it is helpful:
Install and compile MySQL5.5.28 in Linux
Install MySQL 5.6.23 in Linux
Install MySQL 5.6 with the source code in CentOS 7
How to install and configure MySQL5.7.3.0
Install MySQL in Ubuntu 14.04
MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF
Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL
Build a MySQL Master/Slave server in Ubuntu 14.04
Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04
MySQL-5.5.38 universal binary Installation