Skip to content

Instantly share code, notes, and snippets.

@3h5a9
Last active October 8, 2020 14:08
Show Gist options
  • Save 3h5a9/79366ecb22f8e7b84609d4b571146d9d to your computer and use it in GitHub Desktop.
Save 3h5a9/79366ecb22f8e7b84609d4b571146d9d to your computer and use it in GitHub Desktop.
Mysql Showrtcut for Linux (Ubuntu)
mysql -u root -p //enter into mysql as root user
SHOW DATABASES; //Show available databases
DROP DATABASE database_name; //Delete a mysql database
sudo /etc/init.d/mysql.server start //start mysql server
sudo /etc/init.d/mysql.server stop //Stop mysql server
sudo /etc/init.d/mysql.server status //Check status of mysql
sudo update-rc.d -f mysql.server defaults //Enable myql on startup
sudo update-rc.d -f mysql.server remove //Disable mysql on startup (Optional)
sudo /etc/init.d/mysql.server restart //Restart mysql server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment