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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
sorry should have pointed out this is with PHP storm not php designer like i initially said
Is MySQL listening on 127.0.0.1? Edit <code>/etc/mysql/my.cnf</code> and set the <code>listen</code> directive to <code>0.0.0.0</code> <br> <br>Save the file and restart MySQL: <br> <br><pre>sudo service mysql restart</pre> <br> <br>Make sure you also allow ‘username’@‘yourcomputersipaddress’ to access MySQL: <br> <br>https://www.digitalocean.com/community/articles/how-to-create-a-new-user-and-grant-permissions-in-mysql
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.