Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Access from linux/unix shell: `mysql -u [username] -p`
  2. Create new database from mysql shell: `create database [database];`
  3. Select database from mysql shell: `use [database];`
  4. Show all databases from mysql shell: `show databases;`
  5. Select database from mysql shell: `use [database];`
  6. Show all tables from mysql shell: `show tables;`
  7. Show table structure from mysql shell: `describe [table];`
  8. Create new user from mysql shell: `CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';`
  9. Grant `ALL` access to user for `*` tables from mysql shell: `GRANT ALL ON database.* TO 'user'@'localhost';`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement