Nette \ Database \ ConnectionException (HY000)
SQLSTATE[HY000] [1045] Access denied for user 'radouan'@'localhost' (using password: YES)
Previous exceptions
  • SQLSTATE[HY000] [1045] Access denied for user 'radouan'@'localhost' (using password: YES) (1045)
Nette\Database\ConnectionException thrown with message "SQLSTATE[HY000] [1045] Access denied for user 'radouan'@'localhost' (using password: YES)" Stacktrace: #6 Nette\Database\DriverException:from in /home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php:77 #5 PDOException in /home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php:74 #4 PDO:__construct in /home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php:74 #3 Nette\Database\Connection:connect in /home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php:62 #2 Nette\Database\Connection:__construct in /home/jobupeledu/public_html/job2/config/database.php:41 #1 require_once in /home/jobupeledu/public_html/job2/server.php:38 #0 require_once in /home/jobupeledu/public_html/job2/index.php:7
Stack frames (7)
6
Nette\Database\DriverException from
/vendor/nette/database/src/Database/Connection.php77
5
PDOException
/vendor/nette/database/src/Database/Connection.php74
4
PDO __construct
/vendor/nette/database/src/Database/Connection.php74
3
Nette\Database\Connection connect
/vendor/nette/database/src/Database/Connection.php62
2
Nette\Database\Connection __construct
/config/database.php41
1
require_once
/server.php38
0
require_once
/index.php7
/home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php
        $this->params = [$dsn, $user, $password];
        $this->options = (array) $options;
 
        if (empty($options['lazy'])) {
            $this->connect();
        }
    }
 
 
    public function connect(): void
    {
        if ($this->pdo) {
            return;
        }
 
        try {
            $this->pdo = new PDO($this->params[0], $this->params[1], $this->params[2], $this->options);
            $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            throw ConnectionException::from($e);
        }
 
        $class = empty($this->options['driverClass'])
            ? 'Nette\Database\Drivers\\' . ucfirst(str_replace('sql', 'Sql', $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME))) . 'Driver'
            : $this->options['driverClass'];
        $this->driver = new $class;
        $this->preprocessor = new SqlPreprocessor($this);
        $this->driver->initialize($this, $this->options);
        Arrays::invoke($this->onConnect, $this);
    }
 
 
    public function reconnect(): void
    {
        $this->disconnect();
        $this->connect();
    }
 
 
    public function disconnect(): void
/home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php
 
    public function __construct(string $dsn, string $user = null, string $password = null, array $options = null)
    {
        $this->params = [$dsn, $user, $password];
        $this->options = (array) $options;
 
        if (empty($options['lazy'])) {
            $this->connect();
        }
    }
 
 
    public function connect(): void
    {
        if ($this->pdo) {
            return;
        }
 
        try {
            $this->pdo = new PDO($this->params[0], $this->params[1], $this->params[2], $this->options);
            $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            throw ConnectionException::from($e);
        }
 
        $class = empty($this->options['driverClass'])
            ? 'Nette\Database\Drivers\\' . ucfirst(str_replace('sql', 'Sql', $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME))) . 'Driver'
            : $this->options['driverClass'];
        $this->driver = new $class;
        $this->preprocessor = new SqlPreprocessor($this);
        $this->driver->initialize($this, $this->options);
        Arrays::invoke($this->onConnect, $this);
    }
 
 
    public function reconnect(): void
    {
        $this->disconnect();
        $this->connect();
    }
Exception message: SQLSTATE[HY000] [1045] Access denied for user 'radouan'@'localhost' (using password: YES)
/home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php
 
    public function __construct(string $dsn, string $user = null, string $password = null, array $options = null)
    {
        $this->params = [$dsn, $user, $password];
        $this->options = (array) $options;
 
        if (empty($options['lazy'])) {
            $this->connect();
        }
    }
 
 
    public function connect(): void
    {
        if ($this->pdo) {
            return;
        }
 
        try {
            $this->pdo = new PDO($this->params[0], $this->params[1], $this->params[2], $this->options);
            $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            throw ConnectionException::from($e);
        }
 
        $class = empty($this->options['driverClass'])
            ? 'Nette\Database\Drivers\\' . ucfirst(str_replace('sql', 'Sql', $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME))) . 'Driver'
            : $this->options['driverClass'];
        $this->driver = new $class;
        $this->preprocessor = new SqlPreprocessor($this);
        $this->driver->initialize($this, $this->options);
        Arrays::invoke($this->onConnect, $this);
    }
 
 
    public function reconnect(): void
    {
        $this->disconnect();
        $this->connect();
    }
/home/jobupeledu/public_html/job2/vendor/nette/database/src/Database/Connection.php
    /** @var PDO|null */
    private $pdo;
 
    /** @var callable(array, ResultSet): array */
    private $rowNormalizer = [Helpers::class, 'normalizeRow'];
 
    /** @var string|null */
    private $sql;
 
    /** @var int */
    private $transactionDepth = 0;
 
 
    public function __construct(string $dsn, string $user = null, string $password = null, array $options = null)
    {
        $this->params = [$dsn, $user, $password];
        $this->options = (array) $options;
 
        if (empty($options['lazy'])) {
            $this->connect();
        }
    }
 
 
    public function connect(): void
    {
        if ($this->pdo) {
            return;
        }
 
        try {
            $this->pdo = new PDO($this->params[0], $this->params[1], $this->params[2], $this->options);
            $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            throw ConnectionException::from($e);
        }
 
        $class = empty($this->options['driverClass'])
            ? 'Nette\Database\Drivers\\' . ucfirst(str_replace('sql', 'Sql', $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME))) . 'Driver'
            : $this->options['driverClass'];
/home/jobupeledu/public_html/job2/config/database.php
    'connections' => [

        'mysql' => [
            'driver' => 'mysql',
            'url' => null,
            'dsn' => 'mysql:host=localhost;dbname=kyc',
            'port' => '3306',
            'username' => 'radouan',
            'password' => 'root',
            'prefix'   => ''
        ]

    ]


];

$DefaultDriver      =   $DATABASE['default'];

$database           =   new Nette\Database\Connection($DATABASE['connections'][$DefaultDriver]['dsn'], $DATABASE['connections'][$DefaultDriver]['username'], $DATABASE['connections'][$DefaultDriver]['password']);
 
/home/jobupeledu/public_html/job2/server.php
/* =============================================================================================================================*/


    // include autoload file and load all dependencies
    require_once __DIR__ .  '/' . 'vendor/autoload.php';

    // Errors Handler
    require_once __DIR__ .  '/' . 'config/errors.php';

    // File Systems
    require_once __DIR__ .  '/' . 'config/filesystems.php';

    // Configurations
    require_once __DIR__ .  '/' . 'config/config.php';

    // Utilities & Uses
    require_once __DIR__ .  '/' . 'config/utilities.php';

    // Databse connection
    require_once __DIR__ .  '/' . 'config/database.php';

    // Security
    require_once __DIR__ .  '/' . 'config/security.php';
    
    // Main APP CONF
    require_once __DIR__ .  '/' . 'config/app.php';

    // Email Config
    require_once __DIR__ .  '/' . 'config/email.php';


    // // Codes functions
     require_once __DIR__ .  '/' . 'app/main/functions.php';

    // View Structures
    require_once __DIR__ .  '/' . 'config/view.php';

?>
/home/jobupeledu/public_html/job2/index.php

<?php

    // check the vendor/autoload.php file
    if ( file_exists( __DIR__ . '/' . 'vendor/autoload.php' ) ) {

        require_once __DIR__ . '/' . 'server.php';
        require_once __DIR__ .  '/' . $FILES_SYSTEMS['public']['path'] . '/index.php';

    }else{
        echo "Please run <code>composer install </code> - <a target='_blank' href='https://getcomposer.org/doc/03-cli.md#install-i'>Read more from composer</a>";
        exit();
    }

?>

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER jobupeledu
HOME /home/jobupeledu
SCRIPT_NAME /job2/index.php
REQUEST_URI /job2/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 22189
SCRIPT_FILENAME /home/jobupeledu/public_html/job2/index.php
SERVER_ADMIN webmaster@job.upel.edu.ve
CONTEXT_DOCUMENT_ROOT /home/jobupeledu/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/jobupeledu/public_html
REMOTE_ADDR 18.191.55.171
SERVER_PORT 443
SERVER_ADDR 185.217.125.95
SERVER_NAME job.upel.edu.ve
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_HOST job.upel.edu.ve
HTTP_REFERER https://job.upel.edu.ve/job2
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
proxy-nokeepalive 1
SSL_TLS_SNI job.upel.edu.ve
HTTPS on
SCRIPT_URI https://job.upel.edu.ve/job2/
SCRIPT_URL /job2/
UNIQUE_ID ZoPmAFRIEDmEq1OhHdoZYAAAAAI
FCGI_ROLE RESPONDER
PHP_SELF /job2/index.php
REQUEST_TIME_FLOAT 1719920128.0658
REQUEST_TIME 1719920128
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler