Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
adibnoh committed Feb 20, 2018
1 parent 2345152 commit f7e1517
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Mysql/Init.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,30 @@ Done!, try access database remotely using Sequal Pro

![https://i.imgur.com/1gFrdqC.jpg](https://i.imgur.com/1gFrdqC.jpg)

## Logs

### Enable slow query log

Version 5.1.6 and above:

Enter the MySQL shell and run the following command:

`set global slow_query_log = 'ON';`

Set the path to the slow query log:

`set global slow_query_log_file ='/var/log/mysql/slow-query.log';`

Set the amount of time a query needs to run before being logged:

`set global long_query_time = '20';` (default is 10 seconds)

Confirm the changes are active by entering the MySQL shell and running the following command:

`show variables like '%slow%';`

![https://stackoverflow.com/questions/22609257/how-do-i-enable-the-mysql-slow-query-log](https://stackoverflow.com/questions/22609257/how-do-i-enable-the-mysql-slow-query-log)

## Issues

Mysql usage more than 100%
Expand Down
4 changes: 4 additions & 0 deletions Ubuntu/cheat_sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

`cp <origin_path_to_file_or_directory> <destination_path_to_file_or_directory>`

## Empty file content

`> filename`

## Reference

* [https://askubuntu.com/questions/5444/how-to-find-out-how-much-disk-space-is-remaining](https://askubuntu.com/questions/5444/how-to-find-out-how-much-disk-space-is-remaining)
Expand Down
5 changes: 5 additions & 0 deletions forge/cheat_sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cheat Sheet

## Change to root

`sudo -i`

0 comments on commit f7e1517

Please sign in to comment.