Please enable JavaScript.
Coggle requires JavaScript to display documents.
SQL - Coggle Diagram
SQL
Mysql
-
Grant
全部权限
收回全部授权:
revoke all privileges on . from 'ua''%';
全部权限授权:
grant all privileges on . to 'ua''%' with grant option;
db权限
授权:
grant all privileges on db1.* to 'ua''%' with grant option;
表权限
授权:grant all privileges on db1.t1 to 'ua''%' with grant option;
列权限
授权:
GRANT SELECT(id), INSERT (id,a) ON mydb.mytbl TO 'ua''%' with grant option;
-
-
Dump
mysqldump
导出脚本:mysqldump -h 127.0.0.1 -P 3306 -uyiqpku -p --add-locks=0 --no-create-info --single-transaction --set-gtid-purged=OFF db1 t --where="a>900" --result-file=t.sql
-
-
-
-
-
-
-
csv
导出CSV:
show variables like '%secure_file_priv%';
select * from db1.t where a>900 into outfile '/var/lib/mysql-files/t.csv';
-