MYSQL2 What to do if there is no configuration file

Source: Internet
Author: User

1111mysql no configuration file will be configured with the default

Configuration file not used at startup

If no my.cnf file is set using the specified directory my.cnf file and the default read directory , it means that the configuration file is not loaded when MySQL starts, but instead uses the default configuration.

To modify the configuration, you can create a my.cnf file (for example:/ETC/MY.CNF) in the directory that the MySQL default reads, write the configuration that needs to be modified, and then take effect after restarting MySQL.

222 We can add a profile for him.

Create/etc/my.cnf

. Write the following configuration to a file

http://blog.csdn.net/jyongchong/article/details/77862819

Reboot is OK.

333mysql Read configuration file location

View The default directory for reading the configuration file when MySQL starts

Command

MySQL--help|grep ' my.cnf '

Output order of preference, my.cnf, $MYSQL _tcp_port, /etc/my.cnf/etc/mysql/my.cnf/ usr/local/etc/my.cnf ~/.my.cnf /etc/my.cnf,/etc/mysql/my.cnf,/usr/local/etc/ My.cnf, ~/.my.cnf

These are the MySQL default will search my.cnf directory, the order of precedence before the queue.

MYSQL2 What to do if there is no configuration file

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.