MySQL configuration under CentOS

Source: Internet
Author: User

The first post code (/ETC/MY.CNF) is as follows:

#The following options would be passed to all MySQL clients[client] #password        = your_passwordport            3306socket          =/var/lib/mysql/  Mysql.sockdefault_character_set=UTF8 --Encoding problem  default-character-set --Coding issues

There are also [mysqld] under:

[Mysqld]port=3306Socket= /var/lib/mysql/Mysql.sockskip-lockingkey_buffer_size=16mmax_allowed_packet=1mtable_open_cache= -sort_buffer_size=512knet_buffer_length=8kread_buffer_size=256kread_rnd_buffer_size=512kmyisam_sort_buffer_size=8mdefault_character_set=UTF8--coding problemsdefault-character-Set=UTF8 --coding problem Init_connect='SET NAMES UTF8' --coding problems Lower_case_table_names=1--solve MySQL case-sensitive problem under Linux

Ok!

===================================================================

= =

===================================================================

The default my.cnf file is not the case, this is a copy, the steps:

# Find/-iname *.cnf-print

# Find/-iname *.cnf-print
/root/desktop/mysql-5.0. About/mysql-test/std_data/ndb_config_mycnf1.cnf/root/desktop/mysql-5.0. About/mysql-test/std_data/bug15328.cnf/root/desktop/mysql-5.0. About/mysql-test/std_data/ndb_config_mycnf2.cnf/etc/my.cnf/etc/pki/tls/openssl.cnf/usr/share/mysql/my-medium.cnf/usr/share/mysql/my-large.cnf/usr/share/mysql/my-small.cnf/usr/share/mysql/my-huge.cnf/usr/share/mysql/my-innodb-heavy-4g.cnf/usr/share/doc/mysql-server-community-5.0. the/my-medium.cnf/usr/share/doc/mysql-server-community-5.0. the/my-large.cnf/usr/share/doc/mysql-server-community-5.0. the/my-small.cnf/usr/share/doc/mysql-server-community-5.0. the/my-huge.cnf/usr/share/doc/mysql-server-community-5.0. the/my-innodb-heavy-4g.cnf

Copy one out.

cp/usr/share/doc/mysql-server-community-5.0. 92/my-medium.cnf/etc/my.cnf

Whether to overwrite: Y.

=====================================================================

Open it:

Vi/etc/my.cnf

As modified above, press two caps Z save to exit.

=======================================================================

Restart Mysqld

# Service Mysqld Restart

=====================================================================

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.