Advertisement
flycat

MySQL cheatsheet

Oct 6th, 2011
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. mysql
  2.  
  3. mysql> create database front;
  4. mysql> GRANT ALL PRIVILEGES ON front.* to ppdl_front@localhost IDENTIFIED BY 'password';
  5. mysql> SHOW GRANTS FOR 'ppdl_front'@'localhost';
  6. mysql> REVOKE ALL PRIVILEGES ON `shared`.* FROM 'ppdl_front'@'localhost';
  7.  
  8. mysqladmin -h 127.0.0.1 -u root password '123456'
  9.  
  10. # Change type of table
  11.  
  12. ALTER TABLE t1 ENGINE=InnoDB;
  13. show table status; (показать статус таблиц базы данных)
  14.  
  15. # Вывести в столбик:
  16.  
  17. select * from vb_user where username='znnick'\G;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement