Question
Connecting to the database
Im trying to connect to the database using DB navigator in phpDesigner.
I can already connect to my database with php and PDO using localhost as the host and the username and password setup through PHPmyadmin. I dont understand why that works since my database is stored on Digital Oceans VPS but it works, i can write to and from the database no problem and access my database at www.mywebsite/phpadmin
normally when localhosts works it means i have LAMP installed on my local machine but i dont and when i worked previously with shared hosting for another site the host was the ip address.
Anyway i didnt worry about it but now im trying to use DB navigator with PHPstorm and it needs to setup the database connection. since im using the same username and password that works for php connection to the database i assume that is correct.
I have installed the driver library and selected the .com.mysql.jdbc.Driver as the driver.
for URL which i assume must be host i have tried the following:
pretend droplet ip = 123.456.789
jdbc:mysql://localhost:3306
jdbc:mysql://123.456.789:3306
jdbc:mysql://mywebsite.com:3306
jdbc:mysql://www.mywebsite.com:3306
None of these work and all say no packets recieved. Anyone know what the correct connection string is?
Add a comment
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×