Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Access from linux/unix shell: `mysql -u [username] -p`
- Create new database from mysql shell: `create database [database];`
- Select database from mysql shell: `use [database];`
- Show all databases from mysql shell: `show databases;`
- Select database from mysql shell: `use [database];`
- Show all tables from mysql shell: `show tables;`
- Show table structure from mysql shell: `describe [table];`
- Create new user from mysql shell: `CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';`
- 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