ALTER | Allows use of ALTER TABLE. |
ALTER ROUTINE | Alters or drops stored routines. |
CREATE | Allows use of CREATE TABLE. |
CREATE ROUTINE | Creates stored routines. |
CREATE TEMPORARY TABLE | Allows use of CREATE TEMPORARY TABLE. |
CREATE USER | Allows use of CREATE USER,DROP USER,RENAME USER, andREVOKE ALL PRIVILEGES. |
CREATE VIEW | Allows use of CREATE VIEW. |
DELETE | Allows use of DELETE. |
DROP | Allows use of DROP TABLE. |
EXECUTE | Allows the user to run stored routines. |
FILE | Allows use of SELECT...INTO OUTFILE and LOAD DATA INFILE. |
INDEX | Allows use of CREATE INDEX andDROP INDEX. |
INSERT | Allows use of INSERT. |
LOCK TABLES | Allows use of LOCK TABLES on tables for which the user also hasSELECT privileges. |
PROCESS | Allows use of SHOW FULL PROCESSLIST. |
RELOAD | Allows use of FLUSH. |
REPLICATION | Allows the user to ask where slave or master |
CLIENT | servers are. |
REPLICATION SLAVE | Needed for replication slaves. |
SELECT | Allows use of SELECT. |
SHOW DATABASES | Allows use of SHOW DATABASES. |
SHOW VIEW | Allows use of SHOW CREATE VIEW. |
SHUTDOWN | Allows use of mysqladmin shutdown. |
SUPER | Allows use of CHANGE MASTER,KILL,PURGE MASTER LOGS, andSET GLOBAL SQL statements. Allowsmysqladmin debug command. Allows one extra connection to be made if maximum connections are reached. |
UPDATE | Allows use of UPDATE. |
USAGE | Allows connection without any specific privileges. |
六.导入导出
导入sql脚本:
mysql -u 用户名 -p 数据库名
如: mysql -u app -p test 回车需要输入密码
mysql> source sql脚本所在的路径
如:mysql> source d:/mysql_tablse.sql
七.命令
mysql服务的启动和停止(net stop mysql net start mysql)
登陆mysql
mysql -u用户名 -h远程连接地址 -p密码
需要注意的是-p后面加空格的话表示的是进入的是哪个数据库,不输入-p命令回车会要求输入密码
显示数据库列表:show database,进入某个数据库:use xxx
显示所有表:show tabales,显示表结构:describe 表名