Does Azure compatible with local XAMPP database?

TAN KE JING 0 Reputation points
2023-03-16T12:13:23.17+00:00

I am a student and I am planning to migrate my Laravel project to Microsoft Azure, now I have few question to ask about the Microsoft Azure platform.

  1. Does Microsoft Azure compatible with local XAMPP database?
  2. If no compatible then I need to create a Azure SQL database?
  3. If compatible then what configuration I should change in my Laravel project or in the Azure Web app service?
Azure SQL Database
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
    2023-03-18T08:03:08.3233333+00:00

    If you just want a quick migration to get started, create an Azure Linux VM and move your XAMPP bits over. There aren't big changes compared to your own machine.

    When you want to split the components to different Azure services, Azure App Service (Linux) and MariaDB is going to help,

    https://learn.microsoft.com/en-us/azure/mariadb/overview

    https://learn.microsoft.com/en-us/azure/app-service/quickstart-php?tabs=cli&pivots=platform-linux

    0 comments No comments

  2. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2023-03-21T10:16:04.2266667+00:00

    @TAN KE JING , Just checking in to see if the previous post helped answer your question or point you in the right direction.

    As Lex Li mentioned, if you wish to host your WebApp on an Azure Virtual Machine, where you have more control of the infrastructure. Typically, you will setup and configure, the same way, as you would on-prem.

    As for as hosting on Azure App Service, is not compatible with local XAMPP database. You could create an Azure SQL database.
     

    To connect your Laravel project to the Azure SQL database, you need to configure the database connection in your Laravel project.

     

    You can follow the steps in the tutorial :

    "Tutorial: Deploy a PHP (Laravel) app with Azure Database for MySQL - Flexible Server on Azure App Service" to connect your Laravel project to the Azure SQL database.  

    In the repository root, create a file named .env. Copy the following variables into the .env file. Replace the <root_password> placeholder with the MySQL root user's password.

    https://learn.microsoft.com/azure/mysql/flexible-server/tutorial-php-database-app

     

    For more info DB config:

    If you’re connecting to an external database update the database related values under config/database.php accordingly. For example, if using mysql as your database make sure to update these values and add any environment variables being used as App Settings in the Azure Portal.

    Laravel Deployment on App Service Linux

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.