The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Access denied for user error

Discussion in 'Database Discussions' started by Dioartis, Oct 28, 2015.

  1. Dioartis

    Dioartis Registered

    Joined:
    Jun 19, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Moldova
    cPanel Access Level:
    Root Administrator
    I get this error on my web pages SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)


    Also I've noticed this error
    Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    Failed: Can't call method "quote" on an undefined value at /usr/local/cpanel/Cpanel/DBBackend.pm line 103.


    Help me please


    Code:
    
    Restarting MySQL Server
    
    Waiting for “mysql” to restart ……waiting for “mysql” to initialize ……
    …finished.
    
    Service Status
    mysql (/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/server.webfundament.com.err --open-files-limit=10000 --pid-file=/var/lib/mysql/server.webfundament.com.pid) is running as mysql with PID 30735 (pidfile check method).
    
    Startup Log
    Starting MySQL. SUCCESS!
    
    Log Messages
    151028 12:58:14 [Note] /usr/sbin/mysqld: ready for connections.
    151028 12:58:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    151028 12:58:13 mysqld_safe mysqld from pid file /var/lib/mysql/server.webfundament.com.pid ended
    151028 12:58:13 [Note] /usr/sbin/mysqld: Shutdown complete
    151028 12:58:12 [Note] /usr/sbin/mysqld: Normal shutdown
    151028 12:56:16 [Note] /usr/sbin/mysqld: ready for connections.
    151028 12:56:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    151028 12:56:15 mysqld_safe mysqld from pid file /var/lib/mysql/server.webfundament.com.pid ended
    151028 12:56:15 [Note] /usr/sbin/mysqld: Shutdown complete
    151028 12:56:13 [Note] /usr/sbin/mysqld: Normal shutdown
    151028 12:51:56 [Note] /usr/sbin/mysqld: ready for connections.
    151028 12:51:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    151028 12:51:55 mysqld_safe mysqld from pid file /var/lib/mysql/server.webfundament.com.pid ended
    151028 12:51:55 [Note] /usr/sbin/mysqld: Shutdown complete
    151028 12:51:52 [Note] /usr/sbin/mysqld: Normal shutdown
    151028 12:51:20 [Note] /usr/sbin/mysqld: ready for connections.
    151028 12:51:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    151028 12:51:19 mysqld_safe mysqld from pid file /var/lib/mysql/server.webfundament.com.pid ended
    151028 12:51:19 [Note] /usr/sbin/mysqld: Shutdown complete
    151028 12:51:17 [Note] /usr/sbin/mysqld: Normal shutdown
    151028 12:49:04 [Note] /usr/sbin/mysqld: ready for connections.
    151028 12:49:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    151028 12:49:03 mysqld_safe mysqld from pid file /var/lib/mysql/server.webfundament.com.pid ended
    
    mysql restarted successfully.
     
    
     
    #1 Dioartis, Oct 28, 2015
    Last edited by a moderator: Oct 28, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please review the configuration file for the script to ensure you are using the correct MySQL database name and username. Also, browse to the "MySQL Databases" option in cPanel to ensure you have added the database username to the database.

    Thank you.
     
Loading...

Share This Page