PHP Access denied

Status
Not open for further replies.

joe95443-joeos83

New Member
Messages
3
Reaction score
0
Points
1
For a lot of the PHP commands I do, I get an access denied error. EG: "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Tester'@'web3.vital.x10hosting.com' (using password: YES) in public_html/PHP-1.php on line 6
Unable to select database" How do I allow full PHP access? If I can't have full access how do I use PHP and the Mysql database?
 
Last edited by a moderator:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
MySQL usernames are prefixed with your cpanel username, same with the databases. So "tester" won't work because it doesn't have your cpanel username in front of it.

Check the MySQL Databases section in cpanel; it should show the database name and the user assigned to it so you know which one to use. If there's no database/user shown, use the database wizard to make one :)
 

joe95443-joeos83

New Member
Messages
3
Reaction score
0
Points
1
Sorry, the original code I had used the correct details and it gave the same error. That error message I included was from me testing something. I don't think its my code, and all the database 'stuff' is set up in cpanel. (ALSO: it's not just database things, it's MOST PHP.)
 
Last edited:
Status
Not open for further replies.
Top