Skip to content

Instantly share code, notes, and snippets.

@rordi
Last active January 21, 2020 07:45
Show Gist options
  • Save rordi/cfcb28a060bd1c514e37374e91bc6088 to your computer and use it in GitHub Desktop.
Save rordi/cfcb28a060bd1c514e37374e91bc6088 to your computer and use it in GitHub Desktop.

MariaDB / MySQL Cheatlist

Import a dump file:

mysql -u userName --password=yourSecret dbName < ./path/to/dump.sql

Run command non-interactive:

mysql -u userName --pasword=yourSecret dbName -e 'SELECT * FROM my_table;'

Log in to interactive shell:

mysql -u userName --password=yourSecret dbName

Show all running processes / queries on the server:

show processlist;

Kill a running process / query on the server:

kill processId;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment