Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Help: Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user

Discussion in 'Database Discussion' started by bkjames, Aug 5, 2013.

  1. bkjames

    bkjames Registered

    Aug 5, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    I am creating a website in Adobe Dreamweaver CS6. I am trying to add a page with a membership form that inputs fields to a database.
    I have set up a local test server(using xampp) that has worked. Ie the form accepts the data and passes it through to the database.
    However, when I put the form and files to the Remote Server and try to access the membership entry form page ( I get the following error:

    Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'chopinau_admin'@'localhost' (using password: YES) in /home/chopinau/public_html/Connections/memconn.php on line 9

    Fatal error: Access denied for user 'chopinau_admin'@'localhost' (using password: YES) in /home/chopinau/public_html/Connections/memconn.php on line 9

    code is:
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_memconn = "localhost";
    $database_memconn = "chopinau_membership";
    $username_memconn = "chopinau_admin";
    $password_memconn = "xxxxxxxxxxxxxx";
    $memconn = mysql_pconnect($hostname_memconn, $username_memconn, $password_memconn) or trigger_error(mysql_error(),E_USER_ERROR);

    At wits end. Greatful for any and all advice.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    The error message indicates the database user is denied access to the database. Have you checked to ensure the database user is added to the database? Also, have you tried changing the database user's password to match what is used in the configuration file?

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice