Я пытаюсь перенести API, созданный с помощью Symfony 3.3.12, установленной на AWS, используя базу данных с Amazon RDS на основе MariaDb MariaDB 10.0.24
В моем журнале получим это:
[2018-06-23 18:22:52] request.INFO: Matched route "api_login_check". {"route":"api_login_check","route_parameters":{"_route":"api_login_check"},"request_uri":"https://api.excellenting.com/api/login_check","method":"POST"} []
[2018-06-23 18:22:54] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occured while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value For further information have a look at: https://github.com/doctrine/DoctrineBundle/issues/673" at /home/ubuntu/symfony_backend/vendor/doctrine/doctrine-bundle/ConnectionFactory.php line 96 {"exception":"[object] (Doctrine\\DBAL\\DBALException(code: 0): An exception occured while establishing a connection to figure out your platform version.\nYou can circumvent this by setting a 'server_version' configuration value\n\nFor further information have a look at:\nhttps://github.com/doctrine/DoctrineBundle/issues/673 at /home/ubuntu/symfony_backend/vendor/doctrine/doctrine-bundle/ConnectionFactory.php:96, Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused at /home/ubuntu/symfony_backend/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:108, Doctrine\\DBAL\\Driver\\PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /home/ubuntu/symfony_backend/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /home/ubuntu/symfony_backend/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []
[2018-06-23 18:53:39] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "HEAD /"" at /home/ubuntu/symfony_backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 123 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"HEAD /\" at /home/ubuntu/symfony_backend/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:123, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): at /home/ubuntu/symfony_backend/var/cache/prod/appProdProjectContainerUrlMatcher.php:1585)"} []
Ну, я не вижу или не понимаю соответствующей информации об этом.
Но я занимаюсь расследованием и вижу Руководство по доктрине Syfony 3.3 , в котором говорится об этой проблеме, а в ходе других поисков обнаруживаются проблемы с MariaDB 10.2.7 и Up.
Ну, я понижаю MariaDb до той же версии на оригинальном API:
Ну, я отредактировал app/config/config.yml
, пытаясь 5,6 5,2 (это логическое возвращение значения с mysql -Version
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
server_version: 5.6
charset: UTF8
Shell
mysql -Version
mysql Ver 15.1 Distrib 10.0.35-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Учетные данные в конфигурации верны и попробуйте другую версию с портом 3306, хост с локальным хостом ...
parameters:
database_host: 127.0.0.1
database_port: null
database_name: c1farid
database_user: c1fariduser
database_password: CorrectPassWorD