Deployed 6c9482d with MkDocs version: 1.1.2

This commit is contained in:
github-actions
2021-04-13 06:26:54 +00:00
parent 0aa07b74d2
commit dc330b6152
4 changed files with 59 additions and 59 deletions

View File

@@ -1214,11 +1214,11 @@
# Below, we are configuring slow query settings
slow_query_log=1
slow_query_log_file=/var/log/mysqlslow.log
long_query_time=0.1
long_query_time=1
</code></pre>
<p>Start a container and enable slow query log with the following:</p>
<pre><code>sos $ docker run --name db -v custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=realsecret -d mysql:8
sos $ docker cp custom/mysqld.cnf $(docker ps -qf &quot;name=db&quot;):/etc/mysql/conf.d/custom.cnf
sos $ docker cp custom/my.cnf $(docker ps -qf &quot;name=db&quot;):/etc/mysql/conf.d/custom.cnf
sos $ docker restart $(docker ps -qf &quot;name=db&quot;)
</code></pre>
<p>Import a sample database</p>
@@ -1365,7 +1365,7 @@ docker exec -it $(docker ps -qf &quot;name=db&quot;) bash
# We have configured to log queries that take longer than 1s,
# so this sleep(3) will be logged
mysql -uroot -prealsecret mysql
mysql&gt; sleep(3);
mysql&gt; select sleep(3);
# Now, in the other terminal, tail the slow log to find details about the query
root@62c92c89234d:/etc# tail -f /var/log/mysqlslow.log