Connecting to a remote MySQL database server is easy with Netbeans.
Add New Connection
Goto services > Database > New Connection
Insert Remote MySQL Server Details
You will need to get most of the details from your webhost, or logging into cpanel, plesk or whichever utility your webhosting provider has given you.
Last, press OK > right click on the new connection > Connect
1. The default port for mysql is 3306
2. If you’re getting a message such as “access denied for user db_user”, you might not have configure your remote server’s access host yet. For that, please refer to how to connect to mysql server remotely.
Thank you! I’d been looking for this info, yours is neat and clear.
Thanks for the useful post 😉 really simple but im quite new to this and an error mesg is reported to me after following these steps :
Unable to add connection: Cannot establish a connection to jdbc:mysql://http:mywebsite.com:2020/dbname using com.mysql.jdbc.Driver (must spcify port after ‘:’ in connection string )
did you change the connection string or something? the port should be 3306 by default (see the second image above)
you have saved me from lot of labour this is the correct explanation and the corrects solution. Many Many thanks David
thanks. i tried similar procedure to connect to my cpanel mysql db but it failed to connect. i have added my ip as a remote client in the cpanel but i still cant connect. any help??
Please check that the mysql user you’re using to connect to mysql has the right access
thank u David. interesting explanation.
i try to connect my laptop with my desktop with LAN and the desktop acts as a server and the laptop as client. i create mysql database on my laptop and when i access the databse it retrives error message” IDE unable to establish connection”.
i am not clear with giving of the host and port number.