MySQL official reference manual Chinese version: http://dev.mysql.com/doc/refman/5.1/zh/index.html
Two analysis solutions for MySQL slow query: http://www.bitscn.com/pdb/mysql/201006/186917.html
MySQL slow query log: http://blog.chinaunix.net/u/9817/showart_1093402.html
Common commands
Backup and recovery
Backup Database: mysqldump.exe-u user name-P Password Database Name> Backup file address -- default-character-set = GBK
Recover Database: mysql-u username-P Password Database Name <backup file address -- default-character-set = GBK
Add Remote Account
Grant all privileges on *. * To 'myusername' @ '%' identified by 'mypassword' with grant option;
Index
Create an index: alter table table_name add primary key (column_list );
Alter table table_name add index index_name (column_list );
Create index index_name on table_name (column_list );
Create unique index index_name on table_name (column_list)
Delete index: drop index index_name on talbe_name;
Alter table table_name drop index index_name;
Alter table table_name drop primary key;
Good Method
Group_concat is a powerful MySQL method.
Select group_concat (gameid) from cm_games Concatenates the gameid field in the cm_games table into a string. Each value is separated