Last update at :2024-07-13,Edit by888u
For our ordinary website building project, we choose a cloud server (VPS) to configure the WEB environment, and then the database is usually placed directly in the cloud server together with the website files. However, for some projects we may not be able to use cloud servers, or we need to separate files from databases, so we will use cloud databases. For example, we see that Alibaba Cloud and Tencent Cloud have cloud database products.
The advantage of using a cloud database is that it has relatively high security, so that the database will not malfunction due to cloud server problems, and the migration is relatively simple, just grant authorization and change the binding address. However, according to feedback from some netizens, if we want the database to be separated from the website, it is best to be in the same region, otherwise connection timeouts are prone to occur. Before, I also considered whether the website could solve the problem of placing unBA domain name websites on foreign hosts, static files in third-party storage, and then placing the database in a cloud database in mainland China to achieve faster access.
In this article, there happens to be a netizen who needs to initialize and add a database account in Tencent Cloud MYSQL database, so I will take a screenshot and share it for reference when some netizens need it.
Introduction to articles related to Tencent Cloud:
1. Tencent Cloud server selection and setting custom security group configuration method
2. Tencent Cloud Server uses elastic public IP to replace dynamic IP and fixed IP for the server
3. Tencent Cloud Server Image/Snapshot Backup and Recovery Rollback Data Graphical Tutorial
First, preparations
What is shared in this article is the Tencent Cloud cloud database MYSQL product, so we can only refer to the adding account application and authorization of this product. We need to have a cloud database first. Specifically, we can go to the Tencent Cloud official website to purchase ( You can go directly to the official website here). I remember that they were also doing activities before, with a minimum 256MB memory cloud database for 12 yuan per month.
After the purchase is completed, we can go to the database list to initialize the database. Initialization requires setting the ROOT administrator password of the database. This needs to be remembered because it is needed to log in to the database management.
Second, enable external network access rights
The external network address is turned off by default. If we only use the intranet, we don’t need to turn it on. If we need to reference the database remotely, we definitely need to turn it on. After turning it on, we need to remember the address and use it when configuring the website.
Third, create a new database name
We need to create a database in the database management tool.
Here we directly use Tencent Cloud's database management tool to create a new database.
Here set the database name, select character set, and sorting rules.
Fourth, create a database account
Here we create an account.
Set the account, password, and host name according to the prompts.
Fifth, authorization permissions
After adding the database and user, we also need to bind permissions, otherwise it will be unusable.
Here you see \\"Modify Permissions\\" in the account.
Then select the library we created earlier, then check all, and click OK.
That's it, it seems complicated, but in fact, you can complete the process of creating a cloud MYSQL database user and authorization in Tencent Cloud Database with just a few clicks of the mouse. The default is MYSQL5.6, which can be upgraded to MYSQL5.7. This needs to be based on the actual project.
Recommended site searches: Ministry of Information Industry registration, Hong Kong cloud server 10 yuan a year, Hong Kong server rental, domain name registration, US virtual host, check IP, best US server, asp host US server, how to rent a foreign server,
发表评论