Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Linux installs mysql default profile location

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install Linux mysql default configuration file location, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Install mysql under linux if there is no my.cnf configuration file under / etc

The solution is as follows:

1. Use the which mysqld command to view the installation location of mysql

two。 Use the / usr/local/mysql/bin/mysqld-- verbose-- help | grep-A 1 'Default options' command to view the default path of the configuration file used by mysql. (note that the path to the mysql installation directory obtained by the command in step 1 is marked in red)

From the figure above, we can see the order and location in which mysql reads the configuration file path. First, check whether there is a my.cnf configuration file under / etc/mysql/. If not, we can get a configuration file under / etc. Where does the configuration file come from?

4. Get my.cnf profile

As shown in the figure above, we first change to the support-files directory of the mysql installation directory and view the following file information through the ll command

Copy the configuration file to / etc via cp-r / usr/local/mysql/support-files/my-default.cnf / etc/

Switch to the / etc directory and change the name of the file through mv my-default.cnf my.cnf

5. Edit my.cnf to specify the mysql installation path and mysql data file storage path. The following figure also configures bin-log. You need to specify server_id when configuring bin-log.

6. At this point, we have finished sorting out the configuration file of mysql. You can check whether the configuration is effective by opening bin-log and restarting mysql. If so, the above configuration is successful. If you cannot start after modifying my.cnf, you can view the error message as follows

The above is all the contents of the article "how to install mysql default profile location for Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report