Install and configure mysql online in centos

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.