The MySQL installation configuration for CentOS uses

Source: Internet
Author: User

Installation:

Yum Install-y mysql-server

Use

    1. Restart : service mysqld Restart

The initial installation of the Mysql,root account has no password.

#进入控制台
mysql-u Root Welcome to the MySQL Monitor. show databases; +--------------------+| Database |+--------------------+| information_schema | | mysql | | performance_schema | | test

Set the password ( no need to restart the database to take effect ).

  

Configuration

MySQL config file is/etc/my.cnf

1. Coding

MySQL config file is/etc/my.cnf

Finally add the encoding configuration

[Mysql]default-character-set =utf8

The character encoding here must be consistent with the/usr/share/mysql/charsets/index.xml.

2. Remote connection Settings

Assign all permissions for all tables in all databases to the root user at all IP addresses.

Mysql> Grant all privileges on * * to [e-mail protected] '% ' identified by ' 123456 ';

If you are a new user and not root, create a new user first

Mysql>create user ' username ' @ '% ' identified by ' password ';  

The remote connection is now available.

The MySQL installation configuration for CentOS uses

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.