mysqld_safe Can't log to error log and syslog at the same time.
2017-09-08 16:33
1256 查看
由于安全审计需要,要将mysql的error log 记录到syslog中。
mysqld_safe –verbose –help|grep syslog
–syslog Log messages to syslog with ‘logger’
–skip-syslog Log messages to error log (default)
–syslog-tag=TAG Pass -t “mysqld-TAG” to ‘logger’
MySQL5.6.24 my.cnf中增加如下配置:
[mysqld_safe]
syslog
skip-syslog=false
syslog-tag=3306
确保rsyslog服务启用
service rsyslog status
rsyslogd (pid 2424) is running..
重启mysql服务,发现如下错误:
mysqld_safe Can’t log to error log and syslog at the same time.
Remove all –log-error configuration options for –syslog to take effect.
注释掉my.cnf中的log_error ,重启mysql服务。
检查/var/log/message已经能看到mysql的启动信息了
tail -f /var/log/message
mysqld_safe-3316: Starting mysqld daemon with databases from
参考文档:
https://dev.mysql.com/doc/refman/5.6/en/mysqld-safe.html#option_mysqld_safe_syslog
mysqld_safe –verbose –help|grep syslog
–syslog Log messages to syslog with ‘logger’
–skip-syslog Log messages to error log (default)
–syslog-tag=TAG Pass -t “mysqld-TAG” to ‘logger’
MySQL5.6.24 my.cnf中增加如下配置:
[mysqld_safe]
syslog
skip-syslog=false
syslog-tag=3306
确保rsyslog服务启用
service rsyslog status
rsyslogd (pid 2424) is running..
重启mysql服务,发现如下错误:
mysqld_safe Can’t log to error log and syslog at the same time.
Remove all –log-error configuration options for –syslog to take effect.
注释掉my.cnf中的log_error ,重启mysql服务。
检查/var/log/message已经能看到mysql的启动信息了
tail -f /var/log/message
mysqld_safe-3316: Starting mysqld daemon with databases from
参考文档:
https://dev.mysql.com/doc/refman/5.6/en/mysqld-safe.html#option_mysqld_safe_syslog
相关文章推荐
- full backup and log backup can happen at the same time
- fatal: Cannot update paths and switch to branch 'master' at the same time.
- git checkout -b时fatal: Cannot update paths and switch to branch '' at the same time.解决方案
- fatal: Cannot update paths and switch to branch 'gitlab' at the same time.
- Cannot update paths and switch to branch at the same time
- Cannot update paths and switch to branch at the same time
- clone 远程分支 Cannot update paths and switch to branch 'dev' at the same time. Did you intend to checko
- Cannot update paths and switch to branch 'snapshot_mixuse' at the same time.
- Git问题:Cannot update paths and switch to branch 'dev' at the same time.
- 53. A man can't spin and reel at the same time. 一心不能二用
- Using MERGE in SQL Server to insert, update and delete at the same time
- C++0x : Inefficient way to perform trivial named args and default args at the same time
- How can a database be in-memory and durable at the same time?
- Cannot update paths and switch to branch at the same time(转)
- Can ORACLE use both memory_target and AIX large pages at the same time ?
- how to play music and record from the mic at the same time?
- use code to generate Silverlight Controls at run time, and serialize the control into XAML file
- CentOS编译安装Apache 2.4.x时报错:configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- Read and write a FileStream at the same time