Jump to content

Recommended Posts

hi, ive only just started to do php coding but now ive came over a error i carnt seem to fix :(

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'10.0.0.6' (using password: NO) in /home/a4376893/public_html/dbc.php on line 3

 

^^ That is what is shown when i preveiw it in a browser

But this is what line 3 is:

 

1)<?php

2)$dbname = 'a4376893_test';

3)$link = mysql_connect("mysql6.000webhost.com","root","") or die("Couldn't make connection.");          <------ line 3

4)$db = mysql_select_db($dbname, $link) or die("Couldn't select database");

5)?>

Link to comment
https://forums.phpfreaks.com/topic/145383-solved-help-please/
Share on other sites

i did that now there a error saying::

 

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dean7'@'10.0.0.6' (using password: YES) in /home/a4376893/public_html/dbc.php on line 3

 

witch all i done was put a password and changed root to dean7.

Link to comment
https://forums.phpfreaks.com/topic/145383-solved-help-please/#findComment-763232
Share on other sites

Anything i change with the username bit it just chages the error now i have this error:

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a4376893_youruse'@'10.0.0.6' (using password: YES) in /home/a4376893/public_html/dbc.php on line 3

 

this is the code i have.

 

<?php

$dbname = 'a4376893_test';

$link = mysql_connect("mysql6.000webhost.com","a4376893_yourusername","password") or die("Couldn't make connection.");

$db = mysql_select_db($dbname, $link) or die("Couldn't select database");

?>

Link to comment
https://forums.phpfreaks.com/topic/145383-solved-help-please/#findComment-763243
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.