From b7db0e414483c6b4ad5cb5e22a9be37e111b5be2 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Sun, 10 May 2015 17:34:55 +0800 Subject: [PATCH] New: troubleshooting/debug.mysql.md. --- convert.sh | 8 ++---- faq/1-file.locations.md | 10 ++++++++ html/debug.mysql.html | 35 ++++++++++++++++++++++++++ html/file.locations.html | 10 ++++++++ html/index.html | 1 + html/use.a.bought.ssl.certificate.html | 4 +-- troubleshooting/debug.mysql.md | 17 +++++++++++++ 7 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 html/debug.mysql.html create mode 100644 troubleshooting/debug.mysql.md diff --git a/convert.sh b/convert.sh index e4faab6f..f605a1a5 100644 --- a/convert.sh +++ b/convert.sh @@ -99,13 +99,9 @@ for chapter_dir in ${all_chapter_dirs}; do hide_article_in_index='YES' fi - # Get title. - # title format: '# title' + # Get title in markdown file: '# title' _article_title="$(head -1 ${article_file} | awk -F'# ' '{print $2}')" - # title format: '

title

' - #_article_title="$(head -1 ${article_file} | awk -F'

' '{print $2}' | awk -F'

' '{print $1}')" - #echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD} if [ X"${hide_article_in_index}" == X'NO' ]; then echo "* [${_article_title}](${article_html_file})" >> ${INDEX_MD} fi @@ -115,7 +111,7 @@ for chapter_dir in ${all_chapter_dirs}; do compile_this_file="$?" if [ X"${compile_this_file}" == X'0' -o X"${compile_all}" == X'YES' ]; then - echo -e "\n* Converting: ${article_file}" + echo -e "\n* Converting (#${article_counter}): ${article_file}" ${CMD_CONVERT} ${article_file} ${OUTPUT_DIR} \ output_filename="${article_html_file}" \ title="${_article_title}" \ diff --git a/faq/1-file.locations.md b/faq/1-file.locations.md index 1be0e6b8..99257cea 100644 --- a/faq/1-file.locations.md +++ b/faq/1-file.locations.md @@ -112,6 +112,16 @@ OpenLDAP is configured to log to `/var/log/openldap.log` by default, if it's empty, please check normal syslog log file `/var/log/messages` or `/var/log/syslog` instead. +## MySQL, MariaDB + +Main config file: + +* on RHEL/CentOS: `/etc/my.cnf. +* on Debian/Ubuntu, it's `/etc/mysql/my.cnf`. If you're running MariaDB, it's + `/etc/mysql/mariadb.conf.d/mysqld.cnf`. +* on FreeBSD: `/var/db/mysql/my.cnf`. +* on OpenBSD: `/etc/my.cnf. + ## Amavisd ### Main config files diff --git a/html/debug.mysql.html b/html/debug.mysql.html new file mode 100644 index 00000000..c1212654 --- /dev/null +++ b/html/debug.mysql.html @@ -0,0 +1,35 @@ + + + + Log executed SQL commands in MySQL/MariaDB + + + + +

Log executed SQL commands in MySQL/MariaDB

+
+

Don't know where MySQL config file is? check this tutorial: +Locations of configuration and log files of mojor components.

+
+

To log executed SQL commands, please add below two settings in MySQL/MariaDB +config file my.cnf:

+
[mysqld]
+general_log = 1
+general_log_file = /var/log/mysql.log
+
+ +

Then restart MySQL/MariaDB service.

+

Note: MySQL/MariaDB daemon user must have permission to write this log file.

Document published under a CC BY-ND 3.0 license. If you found something wrong, please do contact us to fix it. + \ No newline at end of file diff --git a/html/file.locations.html b/html/file.locations.html index cb2854d8..036075f1 100644 --- a/html/file.locations.html +++ b/html/file.locations.html @@ -27,6 +27,7 @@

  • OpenLDAP
  • +
  • MySQL, MariaDB
  • Amavisd