Environment:
MySQL 5.6.21 64-bit
CentOS 6.5 64-bit
VMware 10
Navicat for MySQL 11
1. Uninstall your own MySQL
[Root@localhost ~]# yum remove MySQL mysql-server mysql-libs
Check if there is any residue
[Root@localhost ~]# Rpm-qa | Grep-i MySQL
If found, use the RPM-E install package name to uninstall
2. Installation
2.1 Official website Download RPM installation package: Mysql-5.6.21-1.linux_glibc2.5.i386.rpm-bundle.tar
2.2 Unzip the downloaded RPM installation package, CD into the unzip directory, install the following three files sequentially:
[Root@localhost ~]# RPM-IVH mysql-server-5.6.21-1.linux_glibc2.5.x86_64.rpm
[Root@localhost ~]# RPM-IVH mysql-client-5.6.21-1.linux_glibc2.5.x86_64.rpm
[Root@localhost ~]# RPM-IVH mysql-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm
Installation Complete
[[Email protected] ~]# service MySQL start
Prompt MySQL to start successfully, the installation is complete, because MySQL first login must change the password so please look below.
3. Change the password
3.1 Find the initial MySQL password: Open the desktop Root's home folder, the folder menu View->show Hidden files Hook, found at the end of the folder. Mysql_secret file, open inside is MySQL's initial secret Code.
3.2 First Login Change password
[Email protected] ~]# mysql-u root-p
Enter the. Mysql_secret password after the login is successful, execute
MySQL > SET PASSWORD = PASSWORD (' 123456 ');
So the first login to change the password is successful, the next time you log in the above statement with the password
3.3 and then you want to change the password in the following statement:
[[email protected] ~]# use MySQL;
[[Email protected] ~]# Update user set Password=password (' New password ') where user= ' root ';
[Roo[email protected] ~]# FLUSH privileges; (Refresh permissions)
[[email protected] ~]# quit;
4. Configure Remote Access
Log in with the password you just set
[Email protected] ~]# mysql-u root-p
After successful login:
5.1 Connect to MySQL server from any host with Root
MySQL > GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;flush privileges;
5.2 Connect to the MySQL server from the 192.168.1.16 host with Root
MySQL > GRANT all privileges on * * to ' root ' @ ' 192.168.1.16 ' identified by ' 123456 ' with GRANT option;flush privileges;
Parameter description:
* * refers to a database. Table so * * for all databases and tables.
' Root ' @ '% ' for all hosts.
Identified by ' 123456 ' is the password for Telnet.
5. Navicat for MySQL Windows-side connection MySQL server
With SSH channel access, the new connection is configured as follows (two diagrams explained)
1. Configure SSH
2. Configure General
3. Connect
6. Access without SSH Channel:
1. First turn off the CentOS firewall
Shutdown command: Service iptables stop
Permanently shut down the firewall: chkconfig iptables off
View Status: Service iptables status
2. Then enter the CentOS ip,mysql user name and password on the second image in the general section above.
.................................................
At this point, the entire MySQL development environment has been built, congratulations!!!
CentOS 6.5 installation MySQL5.6 and navicat for MySQL connection