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)
Command | Sample |
Create a database and specify the character set | CREATE DATABASE db01 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci; |
Delete a database | DROP DATABASE db01; |
Command | Sample |
Create an account | CREATE USER 'username'@'host' IDENTIFIED BY 'password'; |
Delete an account | DROP USER 'username'@'host'; |
Grant permissions | GRANT SELECT ON db01.* TO 'username'@'host'; |
Query an account in the database | SELECT user,host FROM mysql.user; or SHOW GRANTS FOR 'username'@'hostname'; |
Revoke permissions | Revoke all permissions: REVOKE ALL PRIVILEGES,GRANT OPTION FROM 'username'@'host'; Revoke specified permissions: REVOKE UPDATE ON *.* FROM 'username'@'host'; |
Was this page helpful?