-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMysql-C.sh
More file actions
26 lines (23 loc) · 1 KB
/
Copy pathMysql-C.sh
File metadata and controls
26 lines (23 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/bash
##mysql管理命令
myisamchk -e -r *.MYI
mysql -u root --password=secretpassword foo < sqlcommands.sql
mysql > help\ edit\ exit\ go\ source <filename >\ status\ system <command>\ tee <filename>\ use <database>
mysqladmin create <database_name>\ drop <database_name>\ password <new_password>\ ping\ reload\ status\ shutdown\ variables\ version
mysqlbug
mysqldump --add-drop-table\ -e\ -t\ -d ##
mysqlimport
mysqlshow
###用户创建及权限
grant < privileges > on < project > to < user > [ identified by user-password ] [ with grant option ]
##alter create delete drop index insert lock tables select update all
### databasename.tablename *.*
### root@'%'
revoke < a_privileges > on < an_object > from < a_usser >#剥夺用户权限,并删除该用户
mysql> use mysql
mysql> delete from user where user = "rick"
mysql> flush privileges;
##密码
mysql> use mysql
mysql> select host,user,password from user;
###数据类型