Configure MARIADB remote access permissions to troubleshoot database garbled issues

Source: Internet
Author: User

To configure MARIADB remote access permissions:


1) Login Database:

# mysql-uroot-p


650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/90/19/wKioL1jvLNrxSTFuAAA2IeSSqmU735.png "title=" 7.png "alt=" Wkiol1jvlnrxstfuaaa2iessqmu735.png "/>


2) Configure the remote access permission for the authorized database user,% for all remote IPs, or to specify IP. With GRANT option to reload the permission data in the grant table of the MySQL database:

GRANT all privileges on * * to ' user name ' @ '% ' identified by ' user password ' with GRANT OPTION;


Configure the refresh to take effect after it is done:

Flush privileges;


Solve MARIADB Chinese garbled display problem:


MARIADB master configuration file (Yum installation directory:/ETC/MY.CNF):

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/90/1B/wKiom1jvL1_iMBRGAABJtBY5Q7E616.png "title=" 8.png "alt=" Wkiom1jvl1_imbrgaabjtby5q7e616.png "/>


You can see that the configuration is very concise and also introduces the configuration file under the MY.CNF.D directory.


Edit the Client.cnf file in the MY.CONF.D directory and add it under [client]:

Default-character-set=utf8


Edit the MYSQL-CLIENTS.CNF in the MY.CONF.D directory and add it under [MySQL]:

Default-character-set=utf8


Edit the SERVER.CNF in the MY.CONF.D directory and add it under [mysqld]:

init_connect= ' Set collation_connection = Utf8_general_ci ' init_connect= ' Set NAMES UTF8 ' character-set-server= Utf8collation-server=utf8_general_ciskip-character-set-client-handshake


Restart the MARIADB service can solve the problem of Chinese garbled:

# systemctl Restart Mariadb.service


This article is from the "Do not forget Beginner's mind" blog, please be sure to keep this source http://qq512430.blog.51cto.com/5955081/1915657

Configure MARIADB remote access permissions to troubleshoot database garbled issues

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.