The purpose of this page is to show how you can use a mysql server in azure with free tier for a Laravel Project. I was following this Microsoft Tutorial to run a Laravel Project with Github Actions and I needed to create an Azure Mysql Flexible MYSql Server.
git clone https://github.com/Azure-Samples/laravel-tasks.gitProduct details
Azure Database for MySQL by Microsoft
Basics
Subscription: Azure subscription 1
Resource group: freetrial-rg
Server name: mysqlserver-EXAMPLE
Administrator login: adminEXAMPLE
Password: WHATEVERYOUWANT
Location: West US 3
Availability zone: No preference
High availability: Not enabled
MySQL version: 8.0
Compute + storage: Burstable, B1ms, 1 vCores, 2 GiB RAM, 20 storage, Auto scale IOPS
Backup retention period (in days): 7 day(s)
Storage autogrow: Enabled
Geo-redundancy: Not enabled
Zonal Resiliency: No
Networking
Connectivity method: Public access (allowed IP addresses) and Private endpoint
Allow public access to this resource through the internet using a public IP address: Yes
Allow public access from any Azure service within Azure to this server: Yes
Firewall rules
SSL/TLS: SSL is enforced and TLS version is 1.2. This can be changed after server is created. Learn more
Additional configuration
Data encryption: Service-managed key
Server Parameter - lower_case_table_names: 1
Tags
Note some important facts. Be sure to create firewall rules in the network tab to allow your ip address
Download the DigiCertGlobalRootG2.crt.pem CA Certificate from Settings > Networking
5. Once the deployment has been completed you can try to connect. You have verious options. I can use Oracle Workbench to test your connection
6. Configure your .env file as such as this:
Resource: I found this Youtube Channel very important for information about Azure MYSQL Server. They have monthly webminar recording
Done