Install and configure mysql online under centos 1. install mysql server [java] yum-y install mysql-server 2. Load service to start the service [java]/etc/rc. d/init. d/mysqld start 3. Set mysql Service Startup to auto start [java] chkconfig mysqld on. If you are not sure whether it is set to auto start, run the following command to view [java] chkconfig -- list mysqld (mysqld 0: off 1: off 2: on 3: on 4: on 5: on 6: off) if 2--5 is on, OK4 is displayed. view the current mysql version information [java] mysql-version 5. Modify the default mysql encoding [java] vi/etc/my. added cnf under [client]: [java] default-character-set = utf8 added under [mysqld: [java] character-set-server = utf8 init_connect = 'set names utf8' enter mysql to view the current encoding [java] mysql> show variables like '% character % '; 6. Set the access permission and password [java] mysql> grant all privileges on *. * to 'root' @ '%' identified by '000000'; mysql> grant all privileges on *. * to 'root' @ 'localhost' identified by '100'; mysql> flush privileges; you can use the following code to view the access permission status that has been set [java] select * from mysql. user; 7. Restart mysql service [java]/etc/init. d/mysqld restart 8, thoroughly uninstall mysql [java] yum remove mysql-server mysql-libs compat-mysql51 rm-rf/var/lib/mysql rm/etc/my. cnf check whether there is any mysql software [java] rpm-qa | grep mysql // If yes, continue to delete rpm-ql mysql // view the file location