14
« Last post by egandt on 2020-01-18, 04:59:24 am »
Crash recovery, mysql cmd and phpmyadmin work fine, but nZEDb
[18-Jan-2020 07:54:00 America/New_York] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /websites/nZEDb17a/nzedb/db/DB.php:1343
Stack trace:
#0 /websites/nZEDb17a/nzedb/db/DB.php(1343): PDO->__construct('mysql:host=0;po...', 'DBNAME', 'PASSWORD', Array)
#1 /websites/nZEDb17a/nzedb/db/DB.php(212): nzedb\db\DB->connect(Array)
#2 /websites/nZEDb17a/nzedb/SphinxSearch.php(31): nzedb\db\DB->__construct(Array)
#3 /websites/nZEDb17a/nzedb/Releases.php(66): nzedb\SphinxSearch->__construct()
#4 /websites/nZEDb17a/www/pages/browse.php(10): nzedb\Releases->__construct(Array)
#5 /websites/nZEDb17a/www/index.php(89): require_once('/websites/nZEDb...')
#6 {main}
thrown in /websites/nZEDb17a/nzedb/db/DB.php on line 1343
So if I can manualy connect using this login/password and myphpadmin works, why is nZEDb unable to connect? I tried with and without the socket connection enabled same errrors.
//=========================
// Config you must change - updated by installer.
//=========================
define('DB_SYSTEM', 'mysql');
define('DB_HOST', '127.0.0.1');
define('DB_PORT', '3306');
define('DB_SOCKET', '/var/run/mysqld/mysqld.sock');
define('DB_USER', 'DBUSER');
define('DB_PASSWORD', 'PASSWWORD');
define('DB_NAME', 'DBNAME');
define('DB_PCONNECT', false);
the exact same information works via mysql -u DBUSER -p DBNAME
which also uses the socket so why is nZEDb throwing connections issues and how to debug this? as I see no independent way to verify the connection beyond what I'm doing.
Example of mysql working:
root@vmware_nzdb:/# mysql -u DBUSER -p DBNAME
Enter password: <PASSWORD>
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2730
Server version: 10.0.38-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [nzedb17a]> show tables;
+--------------------------+
| Tables_in_nzedb17a |
+--------------------------+
| allgroups |
| anidb_episodes |
| anidb_info |
| anidb_titles |
| audio_data |
| binaries |
| binaries_1 |
| binaries_1000001 |
| binaries_1000002 |
| binaries_1000003 |
| binaries_1000004 |
| binaries_1000021 |
| binaries_1000025 |
....
ERIC