Reputation: 57
I have a Laravel project that I manage with Laravel forge. The website is provisioned, the database is correctely working.
I can even fully access the DB trough commands on Git bash by doing ssh forge@<IP_ADRESS>
and mysql -u root -p <DB_PASSWORD>
However, if I try to create a new connection on Tableplus by importing it with a Database Connection URL and inserting the DB password I've received when I provisioned the server, I get this error
SSH Error - Wrong username or password
I'm only inserting the DB password as explained in the online guides.
I've tried recreating a new server, using a private key that returns "invalid key". Unfortunately, there is close to none guides online for this particular issue.
What could I do?
Upvotes: 1
Views: 923
Reputation: 11
Reading the documentation shows that Before you provision a server for the first time, you should add your SSH keys to your account. You can do this from the your accounts SSH Keys page in the Forge dashboard.
So you need to go to the copy you public key from you computer and the paste into the Forge ssh add key session, once this is added and saved, and you go back to tableplus to use the database link it then becomes a breeze at this point. Documentation can be found here: https://forge.laravel.com/docs/accounts/ssh.html[enter image description here]1
Upvotes: 0
Reputation: 628
For the upper section (under 127.0.0.1 ) you should provide Port: 3306
.
Also, please mind that user
, password
and database
are your database settings, which can be seen in .env under DB_DATABASE, DB_USERNAME and DB_PASSWORD.
For the SSH section (which is under Over SSH
checkbox) you should provide Port: 22
. The user is forge
. Then you should check Use SSH key
checkbox and provide your SSH private key. There is a lot of info on WEB regarding how to generate it. This key should be added to your Forge SSH keys
in admin as well.
Upvotes: 0