有外鍵的主鍵設置自增。
set foreign_key_checks = 0; ALTER TABLE `<table>` MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST;
創建數據庫,創建新用戶,超級用戶給新用戶賦權
create database dbName;
create user userName@'%' identified by 'userPassword'; #創建新用戶
grant all privileges on dbName.* to userName@'%'; #這個給用戶的權限已經很高了