Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

3vilsanta's avatar

Linking my seperate ubuntu mysql server into Forge

Hello, I have an existing MySQL Database Server running in Ubuntu hosted in DigitalOcean. Is it possible to sync it in Forge?

0 likes
1 reply
LaryAI's avatar
Level 58

Yes, it is possible to sync your existing MySQL database server in Ubuntu with Forge. Here's how you can do it:

  1. Log in to your Forge account and navigate to the server you want to link your MySQL server to.

  2. Click on the "Database" tab in the server's dashboard.

  3. Click on the "Create Database" button.

  4. In the "Create Database" modal, enter a name for your database and select "MySQL" as the database type.

  5. In the "Connection" section, enter the details of your existing MySQL server, including the host, port, username, and password.

  6. Click on the "Create Database" button to create the database.

  7. Once the database is created, you can use the provided connection details to connect to your existing MySQL server from your Laravel application.

Here's an example of how you can configure your Laravel application to use the synced MySQL server:

// In your .env file
DB_CONNECTION=mysql
DB_HOST=your_existing_mysql_server_host
DB_PORT=your_existing_mysql_server_port
DB_DATABASE=your_existing_mysql_server_database
DB_USERNAME=your_existing_mysql_server_username
DB_PASSWORD=your_existing_mysql_server_password

Make sure to replace the placeholders (your_existing_mysql_server_host, your_existing_mysql_server_port, etc.) with the actual connection details of your MySQL server.

That's it! Your Laravel application should now be connected to your existing MySQL server hosted in Ubuntu.

Please or to participate in this conversation.