Original address: http://www.cnblogs.com/zhongshengzhen/
1th step, yum install MySQL[Email protected] ~]# yum-y install Mysql-server
2nd step, set boot start[Email protected] ~]# chkconfig mysqld on
3rd step, start the MySQL service[[Email protected] ~]# service mysqld start
4th step, set the root user password for MySQL[Email protected] ~]# mysql-u rootmysql> set password for [email protected]=password (' root ');mysql> show databases ;
+--------------------+
| Database |
+--------------------+
| Information_schema |
| MySQL |
| Test |
+--------------------+mysql> exit
5th step, login with new password
[Email protected] ~]# mysql-u root-p[[email protected] ~]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
6th step, Basic command
show databases; To view a database that already exists on the system
Use Databasesname; Select the database you want to use
Drop database databasename; Delete the selected database
Exit//Disconnect from database
Create Database test01; To create a database named Test
Show tables; List the tables under the current database
Other basic additions and deletions using standard SQL
7th Step, open telnet permission GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with Grant OPTION;
FLUSH privileges;
Fqa:mysql Tool Not connected
MySQL Database
Error1:2003:can ' t connect to MySQL server on ' localhost '
Workaround: Turn off the firewall feature of Linux.
- #chkconfig iptables off
- #reboot
Error2:1130-host ' ClientIP ' isn't allowed to connect to this MySQL server
Workaround: Use the root user to log on to Linux and change the range of IP addresses allowed to login.
- Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' rootpasswd ' with GRANT option;
This instruction allows all users to log in to the MySQL server with the root user, and if the '% ' transfer ' 192.168.1.124 ', then only the ' 192.168.1.124 ' host can log in.
Now it's time to reconnect to Linux MySQL with Navicat.
Uninstall MySQL1. Yum remove MySQL mysql-server mysql-libs compat-mysql51 2, Rm-rf/var/lib/mysql
3, RM/ETC/MY.CNF
See if you have MySQL software:
Rpm-qa|grep MySQL
If it exists, continue with the deletion.
CentOS6.5 installing MySQL and completely uninstalling