What host do I use to connect to phpMyAdmin (or mySQL)

Status
Not open for further replies.

derision

New Member
Messages
10
Reaction score
0
Points
0
Hi. I recently signed up for my website, www.derisionworld.x10.mx and I was wondering what I use to connect to phpMyAdmin (the host name) I tried localhost, but it can't connect. Any help?
Thanks!
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
If you are trying to connect to mySQL from within a script on your site, you use localhost

If you are trying to connect to mySQL from outside your site, that is not allowed. Remote access has been disabled and will not be enabled.
 

derision

New Member
Messages
10
Reaction score
0
Points
0
I am using localhost, but it does not seem to work.

How do I fix it? I get this error:


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'derision'@'localhost' (using password: NO) in /home/derision/public_html/checklogin.php on line 10
cannot connect


Line 10 is:
mysql_connect("$host", "$username", "$password")or die("cannot connect");

$host="localhost"; is the variable.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. You always need a password

2. Standard method is to use phpMyAdmin in cPanel to create and add a user (with ALL PRIVILEGES) to your database. You use that user and his password. The username will be of the format : your-cPanel-username_something .
 
Status
Not open for further replies.
Top