Fatal error : Uncaught PDOException: SQLSTATE[HY000] [2002] No route to host in /var/WoWSimpleRegistration/application/vendor/catfan/medoo/src/Medoo.php:478 Stack trace: #0 /var/WoWSimpleRegistration/application/include/database.php(30): Medoo\Medoo->__construct() #1 /var/WoWSimpleRegistration/application/loader.php(84): database::db_connect() #2 /var/WoWSimpleRegistration/index.php(32): require_once('...') #3 {main} thrown in /var/WoWSimpleRegistration/application/vendor/catfan/medoo/src/Medoo.php on line 478
在重构trinitycore服务器到10.0.0.0网段之后,数据库报错
原来web那里的config文件没有相应修改
原来是
"2" => array(
'realmid' => 2, // Realm ID
'realmname' => "Realm 2", // Realm Name
'db_host' => "192.168.1.12", // MySQL Host IP
'db_port' => "3306", // MySQL Host Port
'db_user' => "root", // MySQL username
'db_user' => "trinity", // MySQL username
'db_pass' => 'root', // MySQL password
'db_pass' => 'trinity', // MySQL password
'db_name' => "characters" // Characters database name
)
修改成 'db_host' => "192.168.1.5", // MySQL Host IP
忘记了,这台服务器是10.0.0.12内网地址,没法连上。
暂时将将2号服务器的配置全注释掉,这样至少不会报错退出。先将就着。