How to Create a MySQL Database in China?
Tags: mysql, sql, china, database
Published: 2021-03-01 19:54:22

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-create-a-mysql-database.html
---
# What is MySQL?
MySQL is a relational database management system developed by the Swedish company MySQL AB and is an Oracle product.

MySQL is a relational database management system. Relational databases store data in different tables instead of putting all data in a large warehouse, which results in an increase of speed and flexibility.

The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts a dual authorization policy, divided into community version and commercial version. Small and medium-sized website development choose MySQL as the website database of choice, due to its small size, high speed, low total cost of ownership, and characteristics of open source, 

[21YunBox](https://launch-in-china.21yunbox.com/) provides one-click hosting and operation and maintenance free solutions for your MySQL database.

## How to Create a MySQL Database?

1. Register as a [21YunBox member](https://www.21yunbox.com/u/signup/)
2. Select "Database" in the console
3. Then click "Add Database"
4. Create with the following configuration

| Options           | Explanation                                         |
| ----------------- | :-------------------------------------------------: |
| **Database**      | Give the currently created database instance a name |
| Database name     | The name of the database when connecting to the database. If not specified, the system will automatically generate it. |
| Database Username | The username of the database when connecting to the database. If not specified, the system will automatically generate it. |

> Note: **Database name** and **Database user name** cannot be changed being created.

You will find that in the above configuration, the database password is not filled in. This is because the system will automatically generate it and no additional filling is required.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0s70i9cnf29y4qbdz68f.png) *Create a MySQL database and Show Configuration Screenshots*

## How to Connect to the Database Remotely?

In most cases, we connect to the database to add, delete, modify or search and other actions are connected by code.
We have automatically spliced ​​the URL connected to the database, you only need to paste it to complete the configuration and use.

### How to Connect to the Database Under the Intranet?
Under the intranet of 21YunBox, you can directly use **database URL** to connect.

For details, please refer to the database connection section:
- For Python Flask or Django project, please refer to [How to deploy Django project to server?](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-django-project-in-production-server.html)
- PHP Laravel project, please refer to [How to deploy Laravel project to server?](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-laravel-project-in-production-server.html)
- Ruby on Rails project, please refer to [How to deploy Rails project to server?](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-ruby-rails-in-produciton-server.html)
- Java Spring project, please refer to [How to deploy Spring project to server?](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-java-spring-in-produciton-server.html)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cn7k4lxxlce10dz2nexr.png) *Screenshot of MySQL after creation*


### How to Connect to the Database Under the External Network?
In the external network of 21YunBox, you can use the client tools of the visual interface such as [DBeaver](https://dbeaver.io/), or [MySQL Workbench](https: //www.mysql.com/products/workbench/), or directly use **command line** to connect.


## How to Backup the Database?
21YunBox provides a free 7-day cloud database backup, which is stored on a multi-backup cloud disk in `.sql.gz` format on a daily basis.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qlj19bp29tyyjc0b92u6.png) *A sample screenshot of the MySQL backup file after creation*

# Why Choose 21YunBox?

> 21YunBox is a Cloud Service platform based out of Beijing. Our services enable your team to be more effective in leveraging the growing opportunity within China by hosting your sites at blazing speeds with an operational and maintenance free, and low code solution.
>
> 21YunBox provides an easy and budget friendly, end-to-end web platform deployment service for all applications from small teams to large enterprises.
We also offer [full support in obtaining your ICP license]({% post_url 2021-02-12-how-to-get-an-icp %}) allowing you to legally host online content inside of Mainland China.


To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:

* [21YunBox vs Heroku](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-heroku-in-china.html)
* [21YunBox vs Netlify](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html)
* [21YunBox vs Vercel](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-vercel-in-china.html)
* [21YunBox vs Gatsby Cloud](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html)
* [21YunBox vs Github Pages](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-github-pages-in-china.html)
* [21YunBox vs Surge.sh](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-surgesh-in-china.html)
* [Compare in terms of function and price: 21YunBox vs Heroku, Netlify, Vercel](https://www.21yunbox.com/compare-others/)


<br>
*This article's content originated [here](https://launch-in-china.21yunbox.com/solutions/how-to-create-a-mysql-database.html)*

*For additional detail and future modifications, refer the original post.*