Look for “MySQL” in the search bar at the top of the Microsoft official website and then choose Azure Database for MySQL. Create a MySQL database using the resource group, and don’t forget to change the default pricing tier. As we will need them later, please make a note of your database name, login, and password somewhere.
Wait for your database to be created, and we are still working on the database setup: by default, databases on Azure are protected by a firewall. As security is very important, it is also helpful that our database is reachable both by our application and from our development machine, so we need to configure it.
Go to “Connection security” in your MySQL database, and select “Allow access to Azure services”. You must also click on the “Add client IP” button to automatically add your current IP to the firewall rules.
After starting your MySQL server, you must establish a schema. In this example, we’ll use MySQL Workbench, although you can use any other database tool if you choose. Make use of the credentials we just set up to connect to your database. Please be aware that your IP address should be allowed by the MySQL firewall, which you should have done.
Now that you are connected to your database, please create the schema and create tables according to your requirements.
Leave A Comment