How to get mysql database hostname?

Status
Not open for further replies.

Rapala

New Member
Messages
6
Reaction score
0
Points
0
I want to make a program which must use my mysql database. How can i get mysql database hostname?
if i write my hostname, program cant connect to database :(
 

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
Hostname
MYSQL database server is localhost
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
I want to make a program which must use my mysql database. How can i get mysql database hostname?
if i write my hostname, program cant connect to database :(

The database host is localhost.

If you are trying to connect to mysql from outside. For security reasons remote mysql is disabled so you can't connect from outside. But the scripts on your hosting account can connect to database using localhost as dbhost
 
Last edited:

Rapala

New Member
Messages
6
Reaction score
0
Points
0
localhost? i should use in program localhost or my registered idealpost.x10hosting.com?
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
if the program is located on our servers you can use it, in which case the program would be able to connect using localhost.

If the program is located on your computer, no it will not be possible to use it as you can not connect to the mysql server from an IP address outside of our network.
 

Rapala

New Member
Messages
6
Reaction score
0
Points
0
It located in my PC, but i saw 'Remote mysql' option in cPanel. Does it work?
 
Status
Not open for further replies.
Top