Welcome Guest, Not a member yet? Register   Sign In
Using Netbeans to connect to MySQL DB
#1

[eluser]PermanaJ[/eluser]
I'm using Netbeans for my PHP editor. Im trying to connect to the MySQL database on my hosting, not MySQL database on mycomputer. I'm not really understand what to put on the field, anyone try it before ?
#2

[eluser]n0xie[/eluser]
Name: MySQL Connector/ J drive
Host: the ip/dns name of your server
Port: the port number the mysql daemon is listening on (usually 3306)
Database: the name of your database
User Name: A valid user for the database
Password: the password associated with that user.

That's all...
#3

[eluser]PermanaJ[/eluser]
Unable to add connection, Cannot establish connection to jdbc:// .... I've keep trying but no luck ...
#4

[eluser]Cro_Crx[/eluser]
YAY another NetBeans user Smile

Up the top it has two options, one called "Field Entry" and the other for "Direct URL Entry". Make sure it's on Field entry otherwise you might get some errors spit out like the one your getting now. Other than that, just make sure your database settings are correct and that your sever is running.

Is your MySQL server on the same machine or a different machine that you're accessing?
#5

[eluser]PermanaJ[/eluser]
yes, I'm on Field Entry. It has field as follow: Name, Host, Port, Database, Username, Password, Additional Props ...

I know what to type on database, username and password field. But, I'm not sure about the others. I have domain indotrademart.net/cpanel to access to cpanel, should I put the indotrademart.net for the host ? Where can I find more detailed information ... ?

Glad to know there are also another Netbeans user .. Smile
#6

[eluser]Cro_Crx[/eluser]
If you go into your CPanel it's more than likely going to have the MySQL server details though. I really doubt that your host will have networking enabled on your MySQL database, almost all the time your database is only accessible on the same machine or the local network it's connected on.

If you want to edit your database you've probably got a tool call 'phpmyadmin' in the CPanel somewhere, see if you can find it Smile
#7

[eluser]PermanaJ[/eluser]
Ohhh I see, yeah maybe I can't do it because I'm on shared hosting. Yeah, back to phpmyadmin .... Smile




Theme © iAndrew 2016 - Forum software by © MyBB