1. 查看mysql的字符集:
show variables like '%char%';
2. 添加操作权限, 操作列表:
SELECT, INSERT, UPDATE, DELETE, CREATE, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, DROP, 或者要添加所有就写成ALL
3. 删除/增加unique key:
删除: ALTER TABLE t_name DROP INDEX unique_key_name; # 注意是drop index哦
增加: ALTER TABLE t_name ADD UNIQUE KEY unique_key_name('col1', 'col2');
阅读(977) | 评论(2) | 转发(0) |