This document describes how to create a database and manage database account permissions on the Database Management tab in the TDSQL-C for MySQL console.
Parameter | Description |
---|---|
Database Name | Enter the database name, which can contain up to 64 lowercase letters, digits, hyphens, and underscores and must start with a letter and end with a letter or digit. |
Character Set | Set the character set supported by the database. For more information, see MySQL documentation. |
Sorting Rule | Set the sorting rule of the database. For more information, see MySQL documentation. |
Authorize User | Click Add and select the account to be authorized, permissions to be granted, and host information. You can also delete the authorization record. |
Remarks | Enter remarks for the database, which can contain up to 256 characters. |
You can grant an account the read-only, read-write, DML, DDL, and read-only & index permissions of the created database. The permissions and corresponding SQL statements are as follows:
Permission | Authorization Details | Authorization SQL Statement |
---|---|---|
Read-only | SELECT LOCK TABLES SHOW VIEW |
|
Read-write | ALL PRIVILEGES |
|
DML | SELECT INSERT UPDATE DELETE CREATE TEMPORARY TABLES LOCK TABLES EXECUTE SHOW VIEW EVENT TRIGGER |
|
DDL | CREATE DROP INDEX ALTER CREATE TEMPORARY TABLES LOCK TABLES CREATE VIEW SHOW VIEW CREATE ROUTINE ALTER ROUTINE |
|
Read-only & index | SELECT INDEX LOCK TABLES SHOW VIEW |
|
Was this page helpful?