mysql-Workbench can't connect to server












1















In workbench the status of the server is STOPPED and the startup log message:



2016-05-28 11:14:37 - Checking server status...
2016-05-28 11:14:37 - Trying to connect to MySQL...
2016-05-28 11:14:37 - Can't connect to MySQL server on '127.0.0.1' (111) (2003)
2016-05-28 11:14:37 - Assuming server is not running


When I run:



sudo service mysql status


I get:



mysql start/post-start, process 3061
post-start process 3062


Could anybody help?










share|improve this question

























  • Checking the status after a few minutes it changed to: mysql stop/waiting

    – Dan More
    May 28 '16 at 15:31
















1















In workbench the status of the server is STOPPED and the startup log message:



2016-05-28 11:14:37 - Checking server status...
2016-05-28 11:14:37 - Trying to connect to MySQL...
2016-05-28 11:14:37 - Can't connect to MySQL server on '127.0.0.1' (111) (2003)
2016-05-28 11:14:37 - Assuming server is not running


When I run:



sudo service mysql status


I get:



mysql start/post-start, process 3061
post-start process 3062


Could anybody help?










share|improve this question

























  • Checking the status after a few minutes it changed to: mysql stop/waiting

    – Dan More
    May 28 '16 at 15:31














1












1








1








In workbench the status of the server is STOPPED and the startup log message:



2016-05-28 11:14:37 - Checking server status...
2016-05-28 11:14:37 - Trying to connect to MySQL...
2016-05-28 11:14:37 - Can't connect to MySQL server on '127.0.0.1' (111) (2003)
2016-05-28 11:14:37 - Assuming server is not running


When I run:



sudo service mysql status


I get:



mysql start/post-start, process 3061
post-start process 3062


Could anybody help?










share|improve this question
















In workbench the status of the server is STOPPED and the startup log message:



2016-05-28 11:14:37 - Checking server status...
2016-05-28 11:14:37 - Trying to connect to MySQL...
2016-05-28 11:14:37 - Can't connect to MySQL server on '127.0.0.1' (111) (2003)
2016-05-28 11:14:37 - Assuming server is not running


When I run:



sudo service mysql status


I get:



mysql start/post-start, process 3061
post-start process 3062


Could anybody help?







mysql mysql-workbench






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 28 '16 at 20:19









Bob Carlson

1406




1406










asked May 28 '16 at 15:27









Dan MoreDan More

612




612













  • Checking the status after a few minutes it changed to: mysql stop/waiting

    – Dan More
    May 28 '16 at 15:31



















  • Checking the status after a few minutes it changed to: mysql stop/waiting

    – Dan More
    May 28 '16 at 15:31

















Checking the status after a few minutes it changed to: mysql stop/waiting

– Dan More
May 28 '16 at 15:31





Checking the status after a few minutes it changed to: mysql stop/waiting

– Dan More
May 28 '16 at 15:31










2 Answers
2






active

oldest

votes


















0














Make sure that your /etc/mysql/my.cnf does not have bind-address set, then restart the server. This will allow connections from localhost.






share|improve this answer
























  • I commented out the bind-address option and now I get this:

    – Dan More
    May 28 '16 at 18:53











  • well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

    – Dan More
    May 28 '16 at 18:58











  • Can you upload your my.cnf to paste.ubuntu.com please?

    – Bob Carlson
    May 28 '16 at 19:01











  • OK, just did (I hope)

    – Dan More
    May 28 '16 at 19:06











  • What's the link?

    – Bob Carlson
    May 28 '16 at 19:08



















0














There are many possible issues:




  • Make sure the service is really up and running: netstat -plnt | grep mysql

  • make sure it is on the address:port you expect it to see, for examlpe here you won't be able to connect from outside because the only IP with MySQL is localhost:
    tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12460/mysqld. If you don't see it here but see in the processes (ps -eF | grep mysqld) then perhaps it is bound to socket only.

  • make sure the process is alive by logging in from console: mysql -u user -p

  • make sure the firewall(s) allow(s) your remote host to connect to the server to that port (e.g. nmap, windows version available too)

  • make sure there's no typo in workbench connection settings.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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%2faskubuntu.com%2fquestions%2f778724%2fmysql-workbench-cant-connect-to-server%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









    0














    Make sure that your /etc/mysql/my.cnf does not have bind-address set, then restart the server. This will allow connections from localhost.






    share|improve this answer
























    • I commented out the bind-address option and now I get this:

      – Dan More
      May 28 '16 at 18:53











    • well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

      – Dan More
      May 28 '16 at 18:58











    • Can you upload your my.cnf to paste.ubuntu.com please?

      – Bob Carlson
      May 28 '16 at 19:01











    • OK, just did (I hope)

      – Dan More
      May 28 '16 at 19:06











    • What's the link?

      – Bob Carlson
      May 28 '16 at 19:08
















    0














    Make sure that your /etc/mysql/my.cnf does not have bind-address set, then restart the server. This will allow connections from localhost.






    share|improve this answer
























    • I commented out the bind-address option and now I get this:

      – Dan More
      May 28 '16 at 18:53











    • well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

      – Dan More
      May 28 '16 at 18:58











    • Can you upload your my.cnf to paste.ubuntu.com please?

      – Bob Carlson
      May 28 '16 at 19:01











    • OK, just did (I hope)

      – Dan More
      May 28 '16 at 19:06











    • What's the link?

      – Bob Carlson
      May 28 '16 at 19:08














    0












    0








    0







    Make sure that your /etc/mysql/my.cnf does not have bind-address set, then restart the server. This will allow connections from localhost.






    share|improve this answer













    Make sure that your /etc/mysql/my.cnf does not have bind-address set, then restart the server. This will allow connections from localhost.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered May 28 '16 at 15:31









    Bob CarlsonBob Carlson

    1406




    1406













    • I commented out the bind-address option and now I get this:

      – Dan More
      May 28 '16 at 18:53











    • well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

      – Dan More
      May 28 '16 at 18:58











    • Can you upload your my.cnf to paste.ubuntu.com please?

      – Bob Carlson
      May 28 '16 at 19:01











    • OK, just did (I hope)

      – Dan More
      May 28 '16 at 19:06











    • What's the link?

      – Bob Carlson
      May 28 '16 at 19:08



















    • I commented out the bind-address option and now I get this:

      – Dan More
      May 28 '16 at 18:53











    • well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

      – Dan More
      May 28 '16 at 18:58











    • Can you upload your my.cnf to paste.ubuntu.com please?

      – Bob Carlson
      May 28 '16 at 19:01











    • OK, just did (I hope)

      – Dan More
      May 28 '16 at 19:06











    • What's the link?

      – Bob Carlson
      May 28 '16 at 19:08

















    I commented out the bind-address option and now I get this:

    – Dan More
    May 28 '16 at 18:53





    I commented out the bind-address option and now I get this:

    – Dan More
    May 28 '16 at 18:53













    well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

    – Dan More
    May 28 '16 at 18:58





    well, the log is too long to post. there an error though: [ERROR] /usr/sbin/mysqld: unknown option '--explicit_defaults_for_timestamp' 2016-05-28 14:48:08 [ERROR] Aborting

    – Dan More
    May 28 '16 at 18:58













    Can you upload your my.cnf to paste.ubuntu.com please?

    – Bob Carlson
    May 28 '16 at 19:01





    Can you upload your my.cnf to paste.ubuntu.com please?

    – Bob Carlson
    May 28 '16 at 19:01













    OK, just did (I hope)

    – Dan More
    May 28 '16 at 19:06





    OK, just did (I hope)

    – Dan More
    May 28 '16 at 19:06













    What's the link?

    – Bob Carlson
    May 28 '16 at 19:08





    What's the link?

    – Bob Carlson
    May 28 '16 at 19:08













    0














    There are many possible issues:




    • Make sure the service is really up and running: netstat -plnt | grep mysql

    • make sure it is on the address:port you expect it to see, for examlpe here you won't be able to connect from outside because the only IP with MySQL is localhost:
      tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12460/mysqld. If you don't see it here but see in the processes (ps -eF | grep mysqld) then perhaps it is bound to socket only.

    • make sure the process is alive by logging in from console: mysql -u user -p

    • make sure the firewall(s) allow(s) your remote host to connect to the server to that port (e.g. nmap, windows version available too)

    • make sure there's no typo in workbench connection settings.






    share|improve this answer




























      0














      There are many possible issues:




      • Make sure the service is really up and running: netstat -plnt | grep mysql

      • make sure it is on the address:port you expect it to see, for examlpe here you won't be able to connect from outside because the only IP with MySQL is localhost:
        tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12460/mysqld. If you don't see it here but see in the processes (ps -eF | grep mysqld) then perhaps it is bound to socket only.

      • make sure the process is alive by logging in from console: mysql -u user -p

      • make sure the firewall(s) allow(s) your remote host to connect to the server to that port (e.g. nmap, windows version available too)

      • make sure there's no typo in workbench connection settings.






      share|improve this answer


























        0












        0








        0







        There are many possible issues:




        • Make sure the service is really up and running: netstat -plnt | grep mysql

        • make sure it is on the address:port you expect it to see, for examlpe here you won't be able to connect from outside because the only IP with MySQL is localhost:
          tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12460/mysqld. If you don't see it here but see in the processes (ps -eF | grep mysqld) then perhaps it is bound to socket only.

        • make sure the process is alive by logging in from console: mysql -u user -p

        • make sure the firewall(s) allow(s) your remote host to connect to the server to that port (e.g. nmap, windows version available too)

        • make sure there's no typo in workbench connection settings.






        share|improve this answer













        There are many possible issues:




        • Make sure the service is really up and running: netstat -plnt | grep mysql

        • make sure it is on the address:port you expect it to see, for examlpe here you won't be able to connect from outside because the only IP with MySQL is localhost:
          tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12460/mysqld. If you don't see it here but see in the processes (ps -eF | grep mysqld) then perhaps it is bound to socket only.

        • make sure the process is alive by logging in from console: mysql -u user -p

        • make sure the firewall(s) allow(s) your remote host to connect to the server to that port (e.g. nmap, windows version available too)

        • make sure there's no typo in workbench connection settings.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 29 '16 at 19:18









        PutnikPutnik

        1464




        1464






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f778724%2fmysql-workbench-cant-connect-to-server%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

            How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?