About the problem of installing mysql my.cnf on linux

WBOY
Release: 2023-03-02 14:32:02
Original
1328 people have browsed it

Environment: centos 6.5 32-bit
When mysql is not installed, my.cnf already exists in the /etc/ directory. What is this and what does it do? (The following is a screenshot of my local Linux)

About the problem of installing mysql my.cnf on linux

After installing mysql, follow the online tutorial to execute the following code on mysql:

<code>cp support-files/my-medium.cnf /etc/my.cnf</code>
Copy after login
Copy after login

Isn’t the operation to overwrite the my.cnf of mysql with the my.cnf in the system? Why is this done? It is a my.cnf prepared by Linux for mysql. If the my.cnf file of mysql is not placed under /etc, where else can it be placed? Does not affect the use of mysql

Reply content:

Environment: centos 6.5 32-bit
When mysql is not installed, my.cnf already exists in the /etc/ directory. What is this and what does it do? (The following is a screenshot of my local Linux)

About the problem of installing mysql my.cnf on linux

After installing mysql, follow the online tutorial to execute the following code on mysql:

<code>cp support-files/my-medium.cnf /etc/my.cnf</code>
Copy after login
Copy after login

Isn’t the operation to overwrite the my.cnf of mysql with the my.cnf in the system? Why is this done? It is a my.cnf prepared by Linux for mysql. If the my.cnf file of mysql is not placed under /etc, where else can it be placed? Does not affect the use of mysql

Did you choose to install the Mysql component when installing Centos?

Remove the mysql database installed by yum

<code>yum remove mysql -y</code>
Copy after login

my.cnf is the configuration file loaded when mysql starts. The path of my.cnf can be configured by cmake when installing mysql./

-DSYSCONFDIR=/etc #my.cnf path

The value of -DSYSCONFDIR=/etc in the configuration can be defined by yourself

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!