1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-11 07:40:56 +00:00
awesome-cheatsheets/databases/mysql.sh
2020-12-03 13:04:22 +01:00

11 lines
555 B
Bash

# *****************************************************************************
# BASICS
# *****************************************************************************
mysqldump -h hostname -u username -p database_name -P port > file.sql # Export database
mysql -u username -p database_name < file.sql # Import database
SHOW PROCESSLIST; # Show you any queries that are currently running or in the queue to run
GRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database