From 7b627816c1af7051f4bb121bbe8a7dc8efac0ab0 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Sun, 1 Sep 2013 13:43:19 -0400 Subject: [PATCH] Rearranged the order of some of the mysql cheats. --- cheatsheets/mysql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cheatsheets/mysql b/cheatsheets/mysql index c7a0400..610d395 100644 --- a/cheatsheets/mysql +++ b/cheatsheets/mysql @@ -1,14 +1,14 @@ # To connect to a database mysql -h localhost -u root -p -# To create a database in utf8 charset -CREATE DATABASE owa CHARACTER SET utf8 COLLATE utf8_general_ci; - -# To add a user and give rights on the given database -GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost'IDENTIFIED BY 'password' WITH GRANT OPTION; - # To backup all databases mysqldump --all-databases --all-routines -u root -p > ~/fulldump.sql # To restore all databases mysql -u root -p < ~/fulldump.sql + +# To create a database in utf8 charset +CREATE DATABASE owa CHARACTER SET utf8 COLLATE utf8_general_ci; + +# To add a user and give rights on the given database +GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost'IDENTIFIED BY 'password' WITH GRANT OPTION;