Help Center/
Relational Database Service/
User Guide/
Working with RDS for MariaDB/
Database Management/
Creating a Database
Updated on 2024-10-14 GMT+08:00
Creating a Database
Scenarios
After a DB instance is created, you can create databases on it.
Constraints
- Databases cannot be created for DB instances that are in the process of being restored.
- Database names must be unique.
- After a database is created, the database name cannot be changed.
Creating a Database Through RDS
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the target DB instance.
- On the Databases page, click Create Database. In the displayed dialog box, enter a database name, select a character set, and authorize permissions for users. Then, click OK.
Figure 1 Creating a database
- The database name can contain 1 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. The total number of hyphens (-) cannot exceed 10.
- The default character set is utf8. You can click More to view more character sets.
- Select unauthorized users and click to authorize permissions or select authorized users and click to revoke permissions.
If there are no unauthorized users, you can create one by referring to Creating a Database Account.
- After the database is created, manage it on the Databases page.
Creating a Database Through DAS
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, locate the instance you want to log in and click Log In in the Operation column.
- On the displayed login page, enter the username and password and click Log In.
- On the top menu bar, choose SQL Operations > SQL Query.
- Run the following command to create a database:
create database database_name;
- Run the following command to view the database:
show databases;
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot