We have a working app that successfully returns a token from /auth/user-token
using Symfony 4 and Lexik JWT Authentication Bundle. After I install JWTRefreshTokenBundle, (completing the installation up through step 3), however, I get this error when visiting that existing endpoint:
An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
Reverting my files to a pre-installation state allows the app to work again.
Does anyone have any ideas about what might be going on here?
===
Update: Attempting to run the installation through step 5 (schema update) results in this error:
In AbstractMySQLDriver.php line 113: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused In PDOConnection.php line 50: SQLSTATE[HY000] [2002] Connection refused In PDOConnection.php line 46: SQLSTATE[HY000] [2002] Connection refused
You have to install mysql
and then add the following line to your .env
file at symfony root:
DATABASE_URL="mysql://db_user:[email protected]:3306/db_name"
Then replace the following values with desired values:
db_user
your database user
db_password
your database password
db_name
your database name
Then do the following changes in config/packages/doctrine.yaml
:
doctrine:
dbal:
url: '%env(DATABASE_URL)%'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments