Showing posts with label Mysql manager command. Show all posts
Showing posts with label Mysql manager command. Show all posts

Các lệnh quản lý Mysql - Mysql manager command

1. show big tables in a database

2. show slave status \G
3. Master
   show master status;
   reset master;    -- use to reset master

4. show table status;
5. show create database db_name;

6. Grant privileges:
Ex:
GRANT SELECT, INSERT, DELETE, UPDATE, INDEX, LOCK TABLES, CREATE, EXECUTE  ON db_name.* TO 'db_user'@'%' IDENTIFIED BY 'password';

7. Create random data base on a list values
update your_table_name set method = (SELECT ELT(0.5 + RAND() * 4, 'VALUE_1', 'VALUE_2', 'VALUE_3', 'VALUE_4') )

8.