+ Reply to Thread
Results 1 to 4 of 4

Thread: Warning: mysql_connect(): Access denied?

  1. #1
    _Xero_'s Avatar
    _Xero_ is offline x10Hosting Member _Xero_ is an unknown quantity at this point
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    76

    Warning: mysql_connect(): Access denied?

    Can someone help me with some php-mysql? I keep getting this error on my page:

    Warning: mysql_connect(): Access denied for user: 'xero@localhost' (Using password: NO) in /home/xero/public_html/common.php on line 5
    Error! Could not connect to database: Access denied for user: 'xero@localhost' (Using password: NO)

    this is the source:

    $server = mysql_connect( "localhost", "xero" )
    or die( "Error! Could not connect to database: " . mysql_error() );

    $connect = mysql_select_db( "index", $server )
    or die( "Error! Could not select the database: " . mysql_error() );

  2. #2
    soten355's Avatar
    soten355 is offline x10 Sophmore soten355 is an unknown quantity at this point
    Join Date
    Jan 2006
    Posts
    139

    Re: Warning: mysql_connect(): Access denied?

    it's better to state the full address of the mysql host, because it might be trying to connect to the x10hosting.com's mysql database.


  3. #3
    Bryon is online now Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: Warning: mysql_connect(): Access denied?

    In what you supplied I can tell you one thing.

    1. You aren't using a password in mysql_connect(). This may be your problem?To what Soten355 said: You shouldn't need to worry about connecting to the wrong MySQL server if you supply "localhost" (As the parameter) as the MySQL host to connect to with mysql_connect(). If you want to though, use the IP address: 70.86.136.178

    I think your problem here is with you not supplying a password? Check cPanel and update your MySQL account "xeon's" password, then add that as the third argument to mysql_connect().

    Also, I'm moving this thread to a better-suited forum.

  4. #4
    Brandon Guest

    Re: Warning: mysql_connect(): Access denied?

    I agree with NedreN i'm not the greatest at PHP and MySQL but the password is the problem it looks fine.

+ Reply to Thread

Similar Threads

  1. Have a problem with my forum
    By tikloos in forum Scripts & 3rd Party Apps
    Replies: 43
    Last Post: 01-19-2006, 01:14 AM
  2. errors while attaching
    By mattspec in forum Feedback and Suggestions
    Replies: 0
    Last Post: 12-19-2005, 01:50 PM
  3. access denied?
    By Tele in forum Free Hosting
    Replies: 3
    Last Post: 11-29-2005, 12:16 PM
  4. November Desktop
    By n4tec in forum Off Topic
    Replies: 12
    Last Post: 11-08-2005, 07:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers