In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to modify the location of log files in MySQL. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
You need to change the location of the MySQL log file today, and you can't change it in / etc/my.cnf.
It was later found that the MySQL log bit was specified:
[root@localhost etc] # ps aux | grep mysqld
Root 11830 0.5 0.0 4524 1204 pts/0 S 03:03 0:00 / bin/sh / usr/bin/mysqld_safe-- datadir=/data/mysql-- socket=/var/lib/mysql/mysql.sock-- log-error=/var/log/mysqld.log-- pid-file=/var/run/mysqld/mysqld.pid
Mysql 11890 3.7 0.1 40456 9076 pts/0 Sl 03:03 0:00 / usr/libexec/mysqld-basedir=/usr-datadir=/data/mysql-user=mysql-pid-file=/var/run/mysqld/mysqld.pid-skip-external-locking-port=3306-socket=/var/lib/mysql/mysql.sock
Root 11909 0.0 3908 664 pts/0 S+ 03:03 0:00 grep mysqld
Chkconfig-- list discovery is specified by chkconfig on, and the sky is
Vim / etc/init.d/mysqld knows that it has been configured here.
Get_mysql_option mysqld datadir "/ var/lib/mysql"
Datadir= "$result"
Get_mysql_option mysqld socket "$datadir/mysql.sock"
Socketfile= "$result"
Get_mysql_option mysqld_safe log-error "/ var/log/mysqld.log"
Errlogfile= "$result"
Get_mysql_option mysqld_safe pid-file "/ var/run/mysqld/mysqld.pid"
After reading the above, do you have any further understanding of how to change the location of log files in MySQL? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.