tmp
Wednesday, February 27, 2013
MySQL commands
### login ```bash mysql -h [hostname] -u [user] -p ``` ### show databases ``` show databases; ### select database ``` use [database_name]; ``` ### show tables ``` show tables; ``` ### quit ``` quit; ``` ## grants ### show ``` show grants for 'mysql'@'localhost'; ``` ### add ``` grant all privileges on `foo`.* to 'mysql'@'localhost' grant SELECT, CREATE on `foo`.* to 'mysql'@'localhost' grant grant option on `foo`.* to 'mysql'@'localhost' ``` ### remove ``` revoke all privileges on `foo`.* from 'mysql'@'localhost' revoke SELECT, CREATE on `foo`.* from 'mysql'@'localhost' revoke grant option on `foo`.* from 'mysql'@'localhost' ```
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment