From 6c9482d92121f39a2633115e1ca63e8a5607f939 Mon Sep 17 00:00:00 2001 From: abe shingo <47966774+ashg0@users.noreply.github.com> Date: Tue, 13 Apr 2021 15:26:23 +0900 Subject: [PATCH] Update lab.md (#100) Fixes typos in lab content --- courses/databases_sql/lab.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/courses/databases_sql/lab.md b/courses/databases_sql/lab.md index c946d41..c3293de 100644 --- a/courses/databases_sql/lab.md +++ b/courses/databases_sql/lab.md @@ -18,7 +18,7 @@ sos $ cat custom/my.cnf # 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 ``` @@ -27,7 +27,7 @@ Start a container and enable slow query log with the following: ``` 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 "name=db"):/etc/mysql/conf.d/custom.cnf +sos $ docker cp custom/my.cnf $(docker ps -qf "name=db"):/etc/mysql/conf.d/custom.cnf sos $ docker restart $(docker ps -qf "name=db") ``` @@ -186,7 +186,7 @@ docker exec -it $(docker ps -qf "name=db") bash # We have configured to log queries that take longer than 1s, # so this sleep(3) will be logged mysql -uroot -prealsecret mysql -mysql> sleep(3); +mysql> 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 @@ -204,4 +204,4 @@ SET timestamp=1606402428; select sleep(3); ``` -These were simulated examples with minimal complexity. In real life, the queries would be much more complex and the explain/analyze and slow query logs would have more details. \ No newline at end of file +These were simulated examples with minimal complexity. In real life, the queries would be much more complex and the explain/analyze and slow query logs would have more details.