Skip to content

Instantly share code, notes, and snippets.

@bi0xid
Last active December 14, 2017 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bi0xid/26648f7923e54768826e0bd641b4c462 to your computer and use it in GitHub Desktop.
Save bi0xid/26648f7923e54768826e0bd641b4c462 to your computer and use it in GitHub Desktop.
Cheatsheet for SQL creating a database
select host, user, password from mysql.user;
create database **********;
show databases;
create user '*******'@'%' identified by '**********';
grant all privileges on *********.* to '**********'@'%' identified by '**********';
flush privileges;
mysqldump -u root -p database > database.sql
mysql -u root -p wp_users < wp_users.sql
#grant all privileges uses databasename.* to work (MariaDB).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment