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;








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









share|improve this question
































    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









    share|improve this question




























      0












      0








      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









      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 11:30







      K_P

















      asked Mar 27 at 11:21









      K_PK_P

      11 bronze badge




      11 bronze badge

























          2 Answers
          2






          active

          oldest

          votes


















          1














          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.






          share|improve this answer

























          • 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


















          0














          Check your database configuration in .env file



          DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname






          share|improve this answer



























            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
            );



            );













            draft saved

            draft discarded


















            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









            1














            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.






            share|improve this answer

























            • 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















            1














            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.






            share|improve this answer

























            • 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













            1












            1








            1







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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

















            • 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













            0














            Check your database configuration in .env file



            DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname






            share|improve this answer





























              0














              Check your database configuration in .env file



              DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname






              share|improve this answer



























                0












                0








                0







                Check your database configuration in .env file



                DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname






                share|improve this answer













                Check your database configuration in .env file



                DATABASE_URL=mysql://yourdbusername:yourdbpassword@127.0.0.1:3306/yourdbname







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 24 at 12:35









                manoj yadavmanoj yadav

                114 bronze badges




                114 bronze badges






























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript