我的drupal站点在本地工作,但是,当放在服务器上时,出现以下错误,并且我很困在这里,MySQL数据库上的用户具有所有特权:
PDOException:SQLSTATE [HY000] [2003]无法连接到MySQL服务器 'spustpokupi.eu'(111)在 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php 在第79行#0 /home/spustpok/public_html/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(420): PDO-> __ construct('mysql:host =站点地址','UserfromMySQLDatabases, '来自MySQL数据库的密码',数组)1 /home/spustpok/public_html/core/lib/Drupal/Core/Database/Database.php(371): Drupal \ Core \ Database \ Driver \ mysql \ Connection :: open(Array)2 /home/spustpok/public_html/core/lib/Drupal/Core/Database/Database.php(166): Drupal \ Core \ Database \ Database :: openConnection('default','default')3 [内部功能]: Drupal \ Core \ Database \ Database :: getConnection('default')4 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(79): call_user_func_array('Drupal \ Core \ Dat ...',数组)5 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> createService(Array, “数据库”)6 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(260): Drupal \ Component \ DependencyInjection \ Container-> get('database',1)7 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(62): Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> resolveServicesAndParameters(Array) 8 /home/spustpok/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> createService(Array, 'cache.container')9 /home/spustpok/public_html/core/lib/Drupal/Core/DrupalKernel.php(543): Drupal \ Component \ DependencyInjection \ Container-> get('cache.container') 10 /home/spustpok/public_html/core/lib/Drupal/Core/DrupalKernel.php(904): Drupal \ Core \ DrupalKernel-> getCachedContainerDefinition()11 /home/spustpok/public_html/core/lib/Drupal/Core/DrupalKernel.php(476): Drupal \ Core \ DrupalKernel-> initializeContainer()12 /home/spustpok/public_html/core/lib/Drupal/Core/DrupalKernel.php(692): Drupal \ Core \ DrupalKernel-> boot()13 /home/spustpok/public_html/index.php(19): Drupal \ Core \ DrupalKernel-> handle(Object(Symfony \ Component \ HttpFoundation \ Request)) 14 {main}