symfony 3.4 “An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known”Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is knownSQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownSQLSTATE[HY000][2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownConnection failed: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knownSymfony 3, cache:clear error connection timeoutHow can I change database connection “localhost” to “127.0.0.1” in Symfony 4?Lumen MySQL `QueryException` Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knownIlluminateDatabaseQueryException : SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownAn exception occured in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
Are there really no countries that protect Freedom of Speech as the United States does?
Does an Irish VISA WARNING count as "refused entry at the border of any country other than the UK?"
Finding the shaded region
Good textbook for queueing theory and performance modeling
What would it take to get a message to another star?
Should I leave building the database for the end?
How did Arecibo detect methane lakes on Titan, and image Saturn's rings?
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
Causal Diagrams using Wolfram?
Why does Japan use the same type of AC power outlet as the US?
Link for download latest Edubuntu
What is a "soap"?
What are the odds of rolling specific ability score totals in D&D?
Telephone number in spoken words
Global BGP Routing only by only importing supernet prefixes
Dogfights in outer space
What is the farthest a camera can see?
How to not forget things?
Word for an event that will likely never happen again
Would the USA be eligible to join the European Union?
How does the Athlete Feat affect the Ravnica Centaur playable race?
How much can I judge a company based on a phone screening?
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
Is there a name for the technique in songs/poems, where the rhyming pattern primes the listener for a certain line, which never comes?
symfony 3.4 “An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known”
Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is knownSQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownSQLSTATE[HY000][2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownConnection failed: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knownSymfony 3, cache:clear error connection timeoutHow can I change database connection “localhost” to “127.0.0.1” in Symfony 4?Lumen MySQL `QueryException` Error: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not knownIlluminateDatabaseQueryException : SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not knownAn exception occured in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Hello I'm trying to deploy my project in AWS EC2 and RDS. we developed our application using Symfony 3.4 Framework, my code in localhost is working fine with no issues.
After Hosted in AWS is not working. showing this error
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
Postman Error message:
"error":
"code": 500,
"message": "Internal Server Error",
"exception": [
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
"class": "Doctrine\DBAL\Exception\ConnectionException",
"trace": [
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/var/www/html/ApartmentManagementScms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",
"line": 93,
"args": []
,
]
,
]
Apache Version in AWS:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03
OS version:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
php symfony amazon-ec2 amazon-rds
add a comment |
Hello I'm trying to deploy my project in AWS EC2 and RDS. we developed our application using Symfony 3.4 Framework, my code in localhost is working fine with no issues.
After Hosted in AWS is not working. showing this error
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
Postman Error message:
"error":
"code": 500,
"message": "Internal Server Error",
"exception": [
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
"class": "Doctrine\DBAL\Exception\ConnectionException",
"trace": [
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/var/www/html/ApartmentManagementScms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",
"line": 93,
"args": []
,
]
,
]
Apache Version in AWS:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03
OS version:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
php symfony amazon-ec2 amazon-rds
add a comment |
Hello I'm trying to deploy my project in AWS EC2 and RDS. we developed our application using Symfony 3.4 Framework, my code in localhost is working fine with no issues.
After Hosted in AWS is not working. showing this error
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
Postman Error message:
"error":
"code": 500,
"message": "Internal Server Error",
"exception": [
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
"class": "Doctrine\DBAL\Exception\ConnectionException",
"trace": [
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/var/www/html/ApartmentManagementScms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",
"line": 93,
"args": []
,
]
,
]
Apache Version in AWS:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03
OS version:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
php symfony amazon-ec2 amazon-rds
Hello I'm trying to deploy my project in AWS EC2 and RDS. we developed our application using Symfony 3.4 Framework, my code in localhost is working fine with no issues.
After Hosted in AWS is not working. showing this error
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
Postman Error message:
"error":
"code": 500,
"message": "Internal Server Error",
"exception": [
"message": "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known",
"class": "Doctrine\DBAL\Exception\ConnectionException",
"trace": [
"namespace": "",
"short_class": "",
"class": "",
"type": "",
"function": "",
"file": "/var/www/html/ApartmentManagementScms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",
"line": 93,
"args": []
,
]
,
]
Apache Version in AWS:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2018-06-07T19:43:03
OS version:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
php symfony amazon-ec2 amazon-rds
php symfony amazon-ec2 amazon-rds
edited Mar 27 at 11:30
K_P
asked Mar 27 at 11:21
K_PK_P
11 bronze badge
11 bronze badge
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Double-check the host address you specified in the DSN. This error simply says that the name your specified for the mysql host can't be resolved.
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
add a comment |
Check your database configuration in .env file
DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375988%2fsymfony-3-4-an-exception-occurred-in-driver-sqlstatehy000-2002-php-network%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Double-check the host address you specified in the DSN. This error simply says that the name your specified for the mysql host can't be resolved.
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
add a comment |
Double-check the host address you specified in the DSN. This error simply says that the name your specified for the mysql host can't be resolved.
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
add a comment |
Double-check the host address you specified in the DSN. This error simply says that the name your specified for the mysql host can't be resolved.
Double-check the host address you specified in the DSN. This error simply says that the name your specified for the mysql host can't be resolved.
answered Mar 27 at 11:53
GabrielGabriel
1,0538 silver badges18 bronze badges
1,0538 silver badges18 bronze badges
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
add a comment |
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
Checked everything other pages are working fine, only login functionality is not working after JWT features added using this LexikJWTAuthenticationBundle link
– K_P
Mar 27 at 16:53
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
I'm using Ubuntu I don't is there any packages need to install, help me out from this.
– K_P
Mar 27 at 16:54
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
@Kishor Do you use a centralized way of accessing the DB? (one single place in your code, where you init the connection)? If this is the only page where it fails, maybe this page is using a different piece of code to establish connection.
– Gabriel
Mar 28 at 18:17
add a comment |
Check your database configuration in .env file
DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname
add a comment |
Check your database configuration in .env file
DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname
add a comment |
Check your database configuration in .env file
DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname
Check your database configuration in .env file
DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname
answered Jul 24 at 12:35
manoj yadavmanoj yadav
114 bronze badges
114 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375988%2fsymfony-3-4-an-exception-occurred-in-driver-sqlstatehy000-2002-php-network%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown