PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers












17















I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers



Both PHP and MySQL are running in Docker containers.



MySQL version: 8.0.1



PHP version: 7.1.3



Driver: pdo_mysql



charset: UTF8



dsn: "mysql:host=mysql;dbname=database;charset=UTF8;"



Any ideas?










share|improve this question



























    17















    I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers



    Both PHP and MySQL are running in Docker containers.



    MySQL version: 8.0.1



    PHP version: 7.1.3



    Driver: pdo_mysql



    charset: UTF8



    dsn: "mysql:host=mysql;dbname=database;charset=UTF8;"



    Any ideas?










    share|improve this question

























      17












      17








      17


      4






      I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers



      Both PHP and MySQL are running in Docker containers.



      MySQL version: 8.0.1



      PHP version: 7.1.3



      Driver: pdo_mysql



      charset: UTF8



      dsn: "mysql:host=mysql;dbname=database;charset=UTF8;"



      Any ideas?










      share|improve this question














      I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers



      Both PHP and MySQL are running in Docker containers.



      MySQL version: 8.0.1



      PHP version: 7.1.3



      Driver: pdo_mysql



      charset: UTF8



      dsn: "mysql:host=mysql;dbname=database;charset=UTF8;"



      Any ideas?







      php mysql symfony pdo doctrine-orm






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 16 '17 at 12:57









      NapasNapas

      1,41722227




      1,41722227
























          5 Answers
          5






          active

          oldest

          votes


















          43














          MySQL 8 changed the default charset to utfmb4. But some clients don't know this charset. Hence when the server reports its default charset to the client, and the client doesn't know what the server means, it throws this error.



          See also https://bugs.mysql.com/bug.php?id=71606



          That bug is against the MySQL Connector/C++ so it's affecting more than just PHP.



          Okay—I got it to work by changing the character set to utf8, to be compatible with non-upgraded clients. I added this to /etc/my.cnf and restarted mysqld:



          [client]
          default-character-set=utf8

          [mysql]
          default-character-set=utf8


          [mysqld]
          collation-server = utf8_unicode_ci
          character-set-server = utf8


          I found these settings in an answer from 2010: Change MySQL default character set to UTF-8 in my.cnf?






          share|improve this answer


























          • Thank you, but didn't work - same error.

            – Napas
            Apr 18 '17 at 18:05











          • It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

            – Bill Karwin
            Apr 18 '17 at 20:47






          • 1





            FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

            – Bill Karwin
            Apr 18 '17 at 20:47













          • I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

            – ssi-anik
            Sep 27 '17 at 10:40











          • Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

            – Lahar Shah
            Oct 25 '18 at 15:08





















          11














          The accepted answer saved me (thanks, Bill!!!), but I ran into another related issue, just wanted to provide some details on my experience -



          After upgrading to MySQL 8.0.11, I experienced the same problem as the OP when using PHP's mysqli_connect() function. In my MySQL directory (in my case, usr/local/mysql), I created the my.cnf file, added the content in the accepted answer, then restarted the MySQL server. However, this produced a new error:



          mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]



          I added the line default_authentication_plugin = mysql_native_password, so my.cnf now looked like:



          [client]
          default-character-set=utf8

          [mysql]
          default-character-set=utf8

          [mysqld]
          collation-server = utf8_unicode_ci
          character-set-server = utf8
          default_authentication_plugin = mysql_native_password


          and I was good to go!



          For additional reference: https://github.com/laradock/laradock/issues/1392






          share|improve this answer





















          • 2





            Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

            – ARA1307
            Aug 29 '18 at 5:19





















          1














          Works for me >



          the environment:



          localhost
          Windows 10
          PHP 5.6.31
          MYSQL 8


          set:



          default-character-set=utf8


          on:




          c:programdatamysqlmysql server 8.0my.ini





          • Not works on> C:Program FilesMySQLMySQL Server 5.5my.ini


          Tools that helps:



          C:Program FilesMySQLMySQL Server 8.0bin>mysql -u root -p

          mysql> show variables like 'char%';

          mysql> show variables like 'collation%';

          m/





          share|improve this answer


























          • It works very well on Windows 10

            – Jhonny Jr.
            Mar 8 at 13:29



















          0














          find section [MySQLi] in your php.ini and add line mysqli.default_charset = "UTF-8". Similar changes my require for section [Pdo_mysql] and [mysqlnd].



          Issue seems to be specifically with MySQL version 8.0, and above solution found working with PHP Version 7.2, and solution didn't work with PHP 7.0






          share|improve this answer


























          • The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

            – Dereckson
            Sep 18 '18 at 19:16



















          -2














          I had the same issue to connect to local system.



          I checked in the services list (Run->Services.msc->Enter) wampmysqld64 was stopped.



          Restarted it. and was able to login.






          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%2f43437490%2fpdo-construct-server-sent-charset-255-unknown-to-the-client-please-rep%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            43














            MySQL 8 changed the default charset to utfmb4. But some clients don't know this charset. Hence when the server reports its default charset to the client, and the client doesn't know what the server means, it throws this error.



            See also https://bugs.mysql.com/bug.php?id=71606



            That bug is against the MySQL Connector/C++ so it's affecting more than just PHP.



            Okay—I got it to work by changing the character set to utf8, to be compatible with non-upgraded clients. I added this to /etc/my.cnf and restarted mysqld:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8


            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8


            I found these settings in an answer from 2010: Change MySQL default character set to UTF-8 in my.cnf?






            share|improve this answer


























            • Thank you, but didn't work - same error.

              – Napas
              Apr 18 '17 at 18:05











            • It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

              – Bill Karwin
              Apr 18 '17 at 20:47






            • 1





              FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

              – Bill Karwin
              Apr 18 '17 at 20:47













            • I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

              – ssi-anik
              Sep 27 '17 at 10:40











            • Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

              – Lahar Shah
              Oct 25 '18 at 15:08


















            43














            MySQL 8 changed the default charset to utfmb4. But some clients don't know this charset. Hence when the server reports its default charset to the client, and the client doesn't know what the server means, it throws this error.



            See also https://bugs.mysql.com/bug.php?id=71606



            That bug is against the MySQL Connector/C++ so it's affecting more than just PHP.



            Okay—I got it to work by changing the character set to utf8, to be compatible with non-upgraded clients. I added this to /etc/my.cnf and restarted mysqld:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8


            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8


            I found these settings in an answer from 2010: Change MySQL default character set to UTF-8 in my.cnf?






            share|improve this answer


























            • Thank you, but didn't work - same error.

              – Napas
              Apr 18 '17 at 18:05











            • It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

              – Bill Karwin
              Apr 18 '17 at 20:47






            • 1





              FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

              – Bill Karwin
              Apr 18 '17 at 20:47













            • I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

              – ssi-anik
              Sep 27 '17 at 10:40











            • Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

              – Lahar Shah
              Oct 25 '18 at 15:08
















            43












            43








            43







            MySQL 8 changed the default charset to utfmb4. But some clients don't know this charset. Hence when the server reports its default charset to the client, and the client doesn't know what the server means, it throws this error.



            See also https://bugs.mysql.com/bug.php?id=71606



            That bug is against the MySQL Connector/C++ so it's affecting more than just PHP.



            Okay—I got it to work by changing the character set to utf8, to be compatible with non-upgraded clients. I added this to /etc/my.cnf and restarted mysqld:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8


            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8


            I found these settings in an answer from 2010: Change MySQL default character set to UTF-8 in my.cnf?






            share|improve this answer















            MySQL 8 changed the default charset to utfmb4. But some clients don't know this charset. Hence when the server reports its default charset to the client, and the client doesn't know what the server means, it throws this error.



            See also https://bugs.mysql.com/bug.php?id=71606



            That bug is against the MySQL Connector/C++ so it's affecting more than just PHP.



            Okay—I got it to work by changing the character set to utf8, to be compatible with non-upgraded clients. I added this to /etc/my.cnf and restarted mysqld:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8


            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8


            I found these settings in an answer from 2010: Change MySQL default character set to UTF-8 in my.cnf?







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 11:54









            Community

            11




            11










            answered Apr 16 '17 at 22:30









            Bill KarwinBill Karwin

            383k64520678




            383k64520678













            • Thank you, but didn't work - same error.

              – Napas
              Apr 18 '17 at 18:05











            • It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

              – Bill Karwin
              Apr 18 '17 at 20:47






            • 1





              FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

              – Bill Karwin
              Apr 18 '17 at 20:47













            • I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

              – ssi-anik
              Sep 27 '17 at 10:40











            • Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

              – Lahar Shah
              Oct 25 '18 at 15:08





















            • Thank you, but didn't work - same error.

              – Napas
              Apr 18 '17 at 18:05











            • It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

              – Bill Karwin
              Apr 18 '17 at 20:47






            • 1





              FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

              – Bill Karwin
              Apr 18 '17 at 20:47













            • I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

              – ssi-anik
              Sep 27 '17 at 10:40











            • Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

              – Lahar Shah
              Oct 25 '18 at 15:08



















            Thank you, but didn't work - same error.

            – Napas
            Apr 18 '17 at 18:05





            Thank you, but didn't work - same error.

            – Napas
            Apr 18 '17 at 18:05













            It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

            – Bill Karwin
            Apr 18 '17 at 20:47





            It worked in my environment. MySQL 8.0.1, PHP 7.1.4. Did you restart the mysql service?

            – Bill Karwin
            Apr 18 '17 at 20:47




            1




            1





            FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

            – Bill Karwin
            Apr 18 '17 at 20:47







            FYI: bugs.php.net/bug.php?id=74461 See the comment from nikic, apparently this has been fixed in PHP source, and I assume it will be released in the near future.

            – Bill Karwin
            Apr 18 '17 at 20:47















            I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

            – ssi-anik
            Sep 27 '17 at 10:40





            I had dockerized application. putting that configuration to /etc/mysql/conf.d solved the error. thanks.

            – ssi-anik
            Sep 27 '17 at 10:40













            Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

            – Lahar Shah
            Oct 25 '18 at 15:08







            Stop mysql server if running, do as stated in the answer and start mysql server back. This way it worked for me.

            – Lahar Shah
            Oct 25 '18 at 15:08















            11














            The accepted answer saved me (thanks, Bill!!!), but I ran into another related issue, just wanted to provide some details on my experience -



            After upgrading to MySQL 8.0.11, I experienced the same problem as the OP when using PHP's mysqli_connect() function. In my MySQL directory (in my case, usr/local/mysql), I created the my.cnf file, added the content in the accepted answer, then restarted the MySQL server. However, this produced a new error:



            mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]



            I added the line default_authentication_plugin = mysql_native_password, so my.cnf now looked like:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8

            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8
            default_authentication_plugin = mysql_native_password


            and I was good to go!



            For additional reference: https://github.com/laradock/laradock/issues/1392






            share|improve this answer





















            • 2





              Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

              – ARA1307
              Aug 29 '18 at 5:19


















            11














            The accepted answer saved me (thanks, Bill!!!), but I ran into another related issue, just wanted to provide some details on my experience -



            After upgrading to MySQL 8.0.11, I experienced the same problem as the OP when using PHP's mysqli_connect() function. In my MySQL directory (in my case, usr/local/mysql), I created the my.cnf file, added the content in the accepted answer, then restarted the MySQL server. However, this produced a new error:



            mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]



            I added the line default_authentication_plugin = mysql_native_password, so my.cnf now looked like:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8

            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8
            default_authentication_plugin = mysql_native_password


            and I was good to go!



            For additional reference: https://github.com/laradock/laradock/issues/1392






            share|improve this answer





















            • 2





              Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

              – ARA1307
              Aug 29 '18 at 5:19
















            11












            11








            11







            The accepted answer saved me (thanks, Bill!!!), but I ran into another related issue, just wanted to provide some details on my experience -



            After upgrading to MySQL 8.0.11, I experienced the same problem as the OP when using PHP's mysqli_connect() function. In my MySQL directory (in my case, usr/local/mysql), I created the my.cnf file, added the content in the accepted answer, then restarted the MySQL server. However, this produced a new error:



            mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]



            I added the line default_authentication_plugin = mysql_native_password, so my.cnf now looked like:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8

            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8
            default_authentication_plugin = mysql_native_password


            and I was good to go!



            For additional reference: https://github.com/laradock/laradock/issues/1392






            share|improve this answer















            The accepted answer saved me (thanks, Bill!!!), but I ran into another related issue, just wanted to provide some details on my experience -



            After upgrading to MySQL 8.0.11, I experienced the same problem as the OP when using PHP's mysqli_connect() function. In my MySQL directory (in my case, usr/local/mysql), I created the my.cnf file, added the content in the accepted answer, then restarted the MySQL server. However, this produced a new error:



            mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]



            I added the line default_authentication_plugin = mysql_native_password, so my.cnf now looked like:



            [client]
            default-character-set=utf8

            [mysql]
            default-character-set=utf8

            [mysqld]
            collation-server = utf8_unicode_ci
            character-set-server = utf8
            default_authentication_plugin = mysql_native_password


            and I was good to go!



            For additional reference: https://github.com/laradock/laradock/issues/1392







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 25 at 18:31

























            answered Jun 11 '18 at 4:13









            skwidbrethskwidbreth

            2,55012256




            2,55012256








            • 2





              Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

              – ARA1307
              Aug 29 '18 at 5:19
















            • 2





              Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

              – ARA1307
              Aug 29 '18 at 5:19










            2




            2





            Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

            – ARA1307
            Aug 29 '18 at 5:19







            Note you should create new users specifying "IDENTIFIED WITH mysql_native_password" explicitly, and alter existing users, e.g.: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

            – ARA1307
            Aug 29 '18 at 5:19













            1














            Works for me >



            the environment:



            localhost
            Windows 10
            PHP 5.6.31
            MYSQL 8


            set:



            default-character-set=utf8


            on:




            c:programdatamysqlmysql server 8.0my.ini





            • Not works on> C:Program FilesMySQLMySQL Server 5.5my.ini


            Tools that helps:



            C:Program FilesMySQLMySQL Server 8.0bin>mysql -u root -p

            mysql> show variables like 'char%';

            mysql> show variables like 'collation%';

            m/





            share|improve this answer


























            • It works very well on Windows 10

              – Jhonny Jr.
              Mar 8 at 13:29
















            1














            Works for me >



            the environment:



            localhost
            Windows 10
            PHP 5.6.31
            MYSQL 8


            set:



            default-character-set=utf8


            on:




            c:programdatamysqlmysql server 8.0my.ini





            • Not works on> C:Program FilesMySQLMySQL Server 5.5my.ini


            Tools that helps:



            C:Program FilesMySQLMySQL Server 8.0bin>mysql -u root -p

            mysql> show variables like 'char%';

            mysql> show variables like 'collation%';

            m/





            share|improve this answer


























            • It works very well on Windows 10

              – Jhonny Jr.
              Mar 8 at 13:29














            1












            1








            1







            Works for me >



            the environment:



            localhost
            Windows 10
            PHP 5.6.31
            MYSQL 8


            set:



            default-character-set=utf8


            on:




            c:programdatamysqlmysql server 8.0my.ini





            • Not works on> C:Program FilesMySQLMySQL Server 5.5my.ini


            Tools that helps:



            C:Program FilesMySQLMySQL Server 8.0bin>mysql -u root -p

            mysql> show variables like 'char%';

            mysql> show variables like 'collation%';

            m/





            share|improve this answer















            Works for me >



            the environment:



            localhost
            Windows 10
            PHP 5.6.31
            MYSQL 8


            set:



            default-character-set=utf8


            on:




            c:programdatamysqlmysql server 8.0my.ini





            • Not works on> C:Program FilesMySQLMySQL Server 5.5my.ini


            Tools that helps:



            C:Program FilesMySQLMySQL Server 8.0bin>mysql -u root -p

            mysql> show variables like 'char%';

            mysql> show variables like 'collation%';

            m/






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 22 at 16:31









            Alicia

            1,01912337




            1,01912337










            answered Jan 22 at 15:10









            reyquesonreyqueson

            113




            113













            • It works very well on Windows 10

              – Jhonny Jr.
              Mar 8 at 13:29



















            • It works very well on Windows 10

              – Jhonny Jr.
              Mar 8 at 13:29

















            It works very well on Windows 10

            – Jhonny Jr.
            Mar 8 at 13:29





            It works very well on Windows 10

            – Jhonny Jr.
            Mar 8 at 13:29











            0














            find section [MySQLi] in your php.ini and add line mysqli.default_charset = "UTF-8". Similar changes my require for section [Pdo_mysql] and [mysqlnd].



            Issue seems to be specifically with MySQL version 8.0, and above solution found working with PHP Version 7.2, and solution didn't work with PHP 7.0






            share|improve this answer


























            • The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

              – Dereckson
              Sep 18 '18 at 19:16
















            0














            find section [MySQLi] in your php.ini and add line mysqli.default_charset = "UTF-8". Similar changes my require for section [Pdo_mysql] and [mysqlnd].



            Issue seems to be specifically with MySQL version 8.0, and above solution found working with PHP Version 7.2, and solution didn't work with PHP 7.0






            share|improve this answer


























            • The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

              – Dereckson
              Sep 18 '18 at 19:16














            0












            0








            0







            find section [MySQLi] in your php.ini and add line mysqli.default_charset = "UTF-8". Similar changes my require for section [Pdo_mysql] and [mysqlnd].



            Issue seems to be specifically with MySQL version 8.0, and above solution found working with PHP Version 7.2, and solution didn't work with PHP 7.0






            share|improve this answer















            find section [MySQLi] in your php.ini and add line mysqli.default_charset = "UTF-8". Similar changes my require for section [Pdo_mysql] and [mysqlnd].



            Issue seems to be specifically with MySQL version 8.0, and above solution found working with PHP Version 7.2, and solution didn't work with PHP 7.0







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 23 '18 at 1:40

























            answered Aug 22 '18 at 16:16







            user7154703




















            • The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

              – Dereckson
              Sep 18 '18 at 19:16



















            • The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

              – Dereckson
              Sep 18 '18 at 19:16

















            The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

            – Dereckson
            Sep 18 '18 at 19:16





            The mysqli.default_charset isn't documented at php.net/manual/en/mysqli.configuration.php

            – Dereckson
            Sep 18 '18 at 19:16











            -2














            I had the same issue to connect to local system.



            I checked in the services list (Run->Services.msc->Enter) wampmysqld64 was stopped.



            Restarted it. and was able to login.






            share|improve this answer




























              -2














              I had the same issue to connect to local system.



              I checked in the services list (Run->Services.msc->Enter) wampmysqld64 was stopped.



              Restarted it. and was able to login.






              share|improve this answer


























                -2












                -2








                -2







                I had the same issue to connect to local system.



                I checked in the services list (Run->Services.msc->Enter) wampmysqld64 was stopped.



                Restarted it. and was able to login.






                share|improve this answer













                I had the same issue to connect to local system.



                I checked in the services list (Run->Services.msc->Enter) wampmysqld64 was stopped.



                Restarted it. and was able to login.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 5 '18 at 6:01









                Shashikant PanditShashikant Pandit

                934715




                934715






























                    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%2f43437490%2fpdo-construct-server-sent-charset-255-unknown-to-the-client-please-rep%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







                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini