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

iftekhs's avatar
Level 13

Cannot connect forge database to TablePlus

Hi, I'm newly using laravel forge and I have just provisioned a server using forge then I went into the databases tab and saw there is a url to connect to the by default created forge database and I copied that url and went to table plus and used the import from url option then it filled up many fields for connection to the database then I provided the password that was shown to me and instructed to save it but it failed to connect and sent back wrong username or password then I changed the forge database password from forge then tried again still failed.

Forge connection url

"mysql+ssh://forge@[SERVER_IP]/[email protected]/forge?name=[SERVER-NAME]&usePrivateKey=true"

Table plus error

Wrong username or password
0 likes
2 replies
LaryAI's avatar
Level 58

It sounds like you're having trouble connecting to your Laravel Forge provisioned database using TablePlus. Here's a step-by-step guide to troubleshoot and solve the issue:

  1. Verify Credentials: Double-check the username and password you are using. The default username is usually forge, and the password should be the one you've set or were given when the database was created.

  2. SSH Key: Since the URL includes mysql+ssh, it indicates that the connection is over an SSH tunnel. Make sure you have added your local machine's public SSH key to the server's authorized keys through the Forge interface. You can do this under the 'SSH Keys' section of your server's Forge dashboard.

  3. Private Key in TablePlus: Ensure that you have the correct private key configured in TablePlus. The private key should correspond to the public key you've added to Forge. In TablePlus, you can add the private key by going to the connection's SSH tab and selecting the private key file.

  4. Correct Host and Port: The SSH host should be your server's IP address, and the default SSH port is usually 22 unless you've changed it. The database host should be 127.0.0.1 and the default MySQL port is 3306.

  5. Database User Permissions: Make sure the forge user has the necessary permissions for the forge database. You can verify this through the Forge dashboard or by logging into MySQL on your server and checking the user's privileges.

  6. Firewall Rules: Ensure that your server's firewall (configured through Forge or otherwise) allows connections from your IP address to the SSH and MySQL ports.

  7. Manual Connection: Try connecting manually using a MySQL client on your machine with the SSH tunneling feature to ensure that the issue is not with TablePlus. You can use the following command in your terminal:

ssh -L 33060:127.0.0.1:3306 forge@[SERVER_IP] -i /path/to/private/key

Then, in a new terminal window, try connecting to MySQL:

mysql -u forge -p -h 127.0.0.1 -P 33060

If this works, the issue might be with TablePlus configuration.

  1. TablePlus Connection Settings: In TablePlus, make sure you're using the correct connection settings:
  • Name: Any name for your connection
  • Type: MySQL (SSH)
  • Host: 127.0.0.1
  • User: forge
  • Password: The password you've set for the forge user
  • Database: forge (or your specific database name)
  • Port: 3306
  • SSH Host: [SERVER_IP]
  • SSH User: forge
  • SSH Key: Path to your private key
  1. Update TablePlus: Ensure that you are using the latest version of TablePlus, as updates often fix bugs and improve compatibility.

If you've gone through all these steps and are still facing issues, consider reaching out to Laravel Forge support or the TablePlus support team for further assistance.

1 like

Please or to participate in this conversation.