MySQL [(none)]> SELECT CYNOS_VERSION();+------------------------+| CYNOS_VERSION() |+------------------------+| 5.7.mysql_cynos.1.3.10 |+------------------------+1 row in set (0.00 sec)
MySQL [(none)]> SELECT @@CYNOS_VERSION;+------------------------+| @@CYNOS_VERSION |+------------------------+| 5.7.mysql_cynos.1.3.10 |+------------------------+1 row in set (0.00 sec)
MySQL [(none)]> SHOW VARIABLES LIKE 'CYNOS_VERSION';+---------------+------------------------+| Variable_name | Value |+---------------+------------------------+| cynos_version | 5.7.mysql_cynos.1.3.10 |+---------------+------------------------+1 row in set (0.01 sec)
命令 | 示例 |
创建数据库并指定字符集 | CREATE DATABASE db01 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci; |
删除数据库 | DROP DATABASE db01; |
命令 | 示例 |
创建账号 | CREATE USER 'username'@'host' IDENTIFIED BY 'password'; |
删除账号 | DROP USER 'username'@'host'; |
赋权 | GRANT SELECT ON db01.* TO 'username'@'host'; |
查询数据库中的账号 | SELECT user,host FROM mysql.user; 或 SHOW GRANTS FOR 'username'@'hostname'; |
权限回收 | 收回全部权限: REVOKE ALL PRIVILEGES,GRANT OPTION FROM 'username'@'host'; 收回指定权限: REVOKE UPDATE ON *.* FROM 'username'@'host'; |
本页内容是否解决了您的问题?