Unable to get any type of connection using MySQL on LAN





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















My question is rather simple, I have a Windows 7 machine that is hosting an Apache server and a MySQL server using the XAMPP control panel. Both of these have been installed as a service on the machine. I am trying to connect to the MySQL server from a CentOS machine that is on the same LAN. When issuing the command:



mysql -h *IPADD* -u *UNAME* -p*PWORD*



I get this error:



ERROR 2003 (HY000): Can't connect to MySQL server on '172.26.96.166' (110)



I also see no indication in any logs on the Windows machine that there was a connection attempt.



I have spent much time trying to figure out a cause for this and I cannot seem to figure out the issue. I have:



Checked the firewall and explicitly made an exception for mysql



Installed MySQL as a service on the machine



Used the netstat command to verify that the ports are open



Checked and re-checked the username and password being used



Checked the host associated with the used credentials (the host is set to the wild card (%)



After doing all of this, I cant seem to find anything wrong or that would be blocking it. To give some sort of context, I am using this on a medium sized network and my account on the Windows machine is not Admin. However, I have had extensive help from an admin who has been the one authenticating me to change the firewall and what have you. That being said, there still may be restrictions on his account due to some grouping policies or the way the computer is imaged.



It may also be important to note that I am not directly in front of the CentOS machine, I am using "Putty" on the Windows machine to ssh into the machine to issue the MySQL commands



Anything I may have missed or any advice would be much appreciated.










share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

    – Nawaz Sohail
    Mar 27 '15 at 20:14






  • 1





    You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

    – Norbert van Nobelen
    Mar 27 '15 at 20:50











  • Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

    – Darksaint2014
    Mar 28 '15 at 15:38











  • What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

    – dartonw
    Mar 28 '15 at 15:55











  • Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

    – Darksaint2014
    Mar 29 '15 at 16:17


















3















My question is rather simple, I have a Windows 7 machine that is hosting an Apache server and a MySQL server using the XAMPP control panel. Both of these have been installed as a service on the machine. I am trying to connect to the MySQL server from a CentOS machine that is on the same LAN. When issuing the command:



mysql -h *IPADD* -u *UNAME* -p*PWORD*



I get this error:



ERROR 2003 (HY000): Can't connect to MySQL server on '172.26.96.166' (110)



I also see no indication in any logs on the Windows machine that there was a connection attempt.



I have spent much time trying to figure out a cause for this and I cannot seem to figure out the issue. I have:



Checked the firewall and explicitly made an exception for mysql



Installed MySQL as a service on the machine



Used the netstat command to verify that the ports are open



Checked and re-checked the username and password being used



Checked the host associated with the used credentials (the host is set to the wild card (%)



After doing all of this, I cant seem to find anything wrong or that would be blocking it. To give some sort of context, I am using this on a medium sized network and my account on the Windows machine is not Admin. However, I have had extensive help from an admin who has been the one authenticating me to change the firewall and what have you. That being said, there still may be restrictions on his account due to some grouping policies or the way the computer is imaged.



It may also be important to note that I am not directly in front of the CentOS machine, I am using "Putty" on the Windows machine to ssh into the machine to issue the MySQL commands



Anything I may have missed or any advice would be much appreciated.










share|improve this question
















bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

    – Nawaz Sohail
    Mar 27 '15 at 20:14






  • 1





    You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

    – Norbert van Nobelen
    Mar 27 '15 at 20:50











  • Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

    – Darksaint2014
    Mar 28 '15 at 15:38











  • What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

    – dartonw
    Mar 28 '15 at 15:55











  • Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

    – Darksaint2014
    Mar 29 '15 at 16:17














3












3








3








My question is rather simple, I have a Windows 7 machine that is hosting an Apache server and a MySQL server using the XAMPP control panel. Both of these have been installed as a service on the machine. I am trying to connect to the MySQL server from a CentOS machine that is on the same LAN. When issuing the command:



mysql -h *IPADD* -u *UNAME* -p*PWORD*



I get this error:



ERROR 2003 (HY000): Can't connect to MySQL server on '172.26.96.166' (110)



I also see no indication in any logs on the Windows machine that there was a connection attempt.



I have spent much time trying to figure out a cause for this and I cannot seem to figure out the issue. I have:



Checked the firewall and explicitly made an exception for mysql



Installed MySQL as a service on the machine



Used the netstat command to verify that the ports are open



Checked and re-checked the username and password being used



Checked the host associated with the used credentials (the host is set to the wild card (%)



After doing all of this, I cant seem to find anything wrong or that would be blocking it. To give some sort of context, I am using this on a medium sized network and my account on the Windows machine is not Admin. However, I have had extensive help from an admin who has been the one authenticating me to change the firewall and what have you. That being said, there still may be restrictions on his account due to some grouping policies or the way the computer is imaged.



It may also be important to note that I am not directly in front of the CentOS machine, I am using "Putty" on the Windows machine to ssh into the machine to issue the MySQL commands



Anything I may have missed or any advice would be much appreciated.










share|improve this question
















My question is rather simple, I have a Windows 7 machine that is hosting an Apache server and a MySQL server using the XAMPP control panel. Both of these have been installed as a service on the machine. I am trying to connect to the MySQL server from a CentOS machine that is on the same LAN. When issuing the command:



mysql -h *IPADD* -u *UNAME* -p*PWORD*



I get this error:



ERROR 2003 (HY000): Can't connect to MySQL server on '172.26.96.166' (110)



I also see no indication in any logs on the Windows machine that there was a connection attempt.



I have spent much time trying to figure out a cause for this and I cannot seem to figure out the issue. I have:



Checked the firewall and explicitly made an exception for mysql



Installed MySQL as a service on the machine



Used the netstat command to verify that the ports are open



Checked and re-checked the username and password being used



Checked the host associated with the used credentials (the host is set to the wild card (%)



After doing all of this, I cant seem to find anything wrong or that would be blocking it. To give some sort of context, I am using this on a medium sized network and my account on the Windows machine is not Admin. However, I have had extensive help from an admin who has been the one authenticating me to change the firewall and what have you. That being said, there still may be restrictions on his account due to some grouping policies or the way the computer is imaged.



It may also be important to note that I am not directly in front of the CentOS machine, I am using "Putty" on the Windows machine to ssh into the machine to issue the MySQL commands



Anything I may have missed or any advice would be much appreciated.







mysql linux windows centos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 1 '18 at 8:05









Husam Mohamed

4101313




4101313










asked Mar 27 '15 at 20:03









Darksaint2014Darksaint2014

161




161





bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 16 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

    – Nawaz Sohail
    Mar 27 '15 at 20:14






  • 1





    You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

    – Norbert van Nobelen
    Mar 27 '15 at 20:50











  • Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

    – Darksaint2014
    Mar 28 '15 at 15:38











  • What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

    – dartonw
    Mar 28 '15 at 15:55











  • Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

    – Darksaint2014
    Mar 29 '15 at 16:17



















  • is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

    – Nawaz Sohail
    Mar 27 '15 at 20:14






  • 1





    You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

    – Norbert van Nobelen
    Mar 27 '15 at 20:50











  • Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

    – Darksaint2014
    Mar 28 '15 at 15:38











  • What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

    – dartonw
    Mar 28 '15 at 15:55











  • Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

    – Darksaint2014
    Mar 29 '15 at 16:17

















is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

– Nawaz Sohail
Mar 27 '15 at 20:14





is MySQL installed on default port 3306? if not you may also need to mention -P<port>. It seems MySQL service is not started yet on windows machine you may check the same on services.msc. hope it helps

– Nawaz Sohail
Mar 27 '15 at 20:14




1




1





You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

– Norbert van Nobelen
Mar 27 '15 at 20:50





You can telnet to the mysql on 172.26.96.166 on port 3306 and see what your response is.

– Norbert van Nobelen
Mar 27 '15 at 20:50













Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

– Darksaint2014
Mar 28 '15 at 15:38





Yes indeed mysql is installed on port 3306 and as far as the netstat command shows it is listening on that port. It is listed as running in my services pane as well and I am trying to connect via Putty. So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there.

– Darksaint2014
Mar 28 '15 at 15:38













What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

– dartonw
Mar 28 '15 at 15:55





What Norbert said ^^. From the Linux machine, telnet 172.26.96.166 3306. You should at least get back a response containing "MySQL". You won't be able to log in, but it's an important step in troubleshooting to verify that the port is accessible to the remote host.

– dartonw
Mar 28 '15 at 15:55













Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

– Darksaint2014
Mar 29 '15 at 16:17





Thank you, I will check on it Tuesday when I have access to the machines again. I will post the results of the Telnet then.

– Darksaint2014
Mar 29 '15 at 16:17










2 Answers
2






active

oldest

votes


















0














There are some many potential reasons for this to happen it could literally be almost a hundred different reasons. That said, here are the top ones I'd test first:




  1. Does your connect command work locally?

  2. Can you confirm that port 3306 is open? netstat -plnt | grep 3306

  3. Have you flushed privileges since adding the new user? mysql -uroot -p mysql -e "flush privileges"

  4. Did you grant the new user use permissions? show grants for 'user'@'hostname'

  5. Can your new remote machine connect to port 3306? telnet <server ip> 3306






share|improve this answer































    0














    Are you using Putty to log in to DB server or some other server?



    If its DB server then, error can be caused by following




    1. Incorrect username/password

    2. Incorrect port number

    3. MySQL DB is not up and running


    If you are trying from different host to connect as in remote DB host make sure




    1. you have connectivity between the hosts and

    2. there is no IP based restrictions. As you know admin can restrict access to certain IP address.


    Hope this helped.






    share|improve this answer


























    • Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

      – Darksaint2014
      Mar 28 '15 at 15:39












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2fdba.stackexchange.com%2fquestions%2f96490%2funable-to-get-any-type-of-connection-using-mysql-on-lan%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














    There are some many potential reasons for this to happen it could literally be almost a hundred different reasons. That said, here are the top ones I'd test first:




    1. Does your connect command work locally?

    2. Can you confirm that port 3306 is open? netstat -plnt | grep 3306

    3. Have you flushed privileges since adding the new user? mysql -uroot -p mysql -e "flush privileges"

    4. Did you grant the new user use permissions? show grants for 'user'@'hostname'

    5. Can your new remote machine connect to port 3306? telnet <server ip> 3306






    share|improve this answer




























      0














      There are some many potential reasons for this to happen it could literally be almost a hundred different reasons. That said, here are the top ones I'd test first:




      1. Does your connect command work locally?

      2. Can you confirm that port 3306 is open? netstat -plnt | grep 3306

      3. Have you flushed privileges since adding the new user? mysql -uroot -p mysql -e "flush privileges"

      4. Did you grant the new user use permissions? show grants for 'user'@'hostname'

      5. Can your new remote machine connect to port 3306? telnet <server ip> 3306






      share|improve this answer


























        0












        0








        0







        There are some many potential reasons for this to happen it could literally be almost a hundred different reasons. That said, here are the top ones I'd test first:




        1. Does your connect command work locally?

        2. Can you confirm that port 3306 is open? netstat -plnt | grep 3306

        3. Have you flushed privileges since adding the new user? mysql -uroot -p mysql -e "flush privileges"

        4. Did you grant the new user use permissions? show grants for 'user'@'hostname'

        5. Can your new remote machine connect to port 3306? telnet <server ip> 3306






        share|improve this answer













        There are some many potential reasons for this to happen it could literally be almost a hundred different reasons. That said, here are the top ones I'd test first:




        1. Does your connect command work locally?

        2. Can you confirm that port 3306 is open? netstat -plnt | grep 3306

        3. Have you flushed privileges since adding the new user? mysql -uroot -p mysql -e "flush privileges"

        4. Did you grant the new user use permissions? show grants for 'user'@'hostname'

        5. Can your new remote machine connect to port 3306? telnet <server ip> 3306







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 18 '17 at 2:19









        Mark DMark D

        63941023




        63941023

























            0














            Are you using Putty to log in to DB server or some other server?



            If its DB server then, error can be caused by following




            1. Incorrect username/password

            2. Incorrect port number

            3. MySQL DB is not up and running


            If you are trying from different host to connect as in remote DB host make sure




            1. you have connectivity between the hosts and

            2. there is no IP based restrictions. As you know admin can restrict access to certain IP address.


            Hope this helped.






            share|improve this answer


























            • Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

              – Darksaint2014
              Mar 28 '15 at 15:39
















            0














            Are you using Putty to log in to DB server or some other server?



            If its DB server then, error can be caused by following




            1. Incorrect username/password

            2. Incorrect port number

            3. MySQL DB is not up and running


            If you are trying from different host to connect as in remote DB host make sure




            1. you have connectivity between the hosts and

            2. there is no IP based restrictions. As you know admin can restrict access to certain IP address.


            Hope this helped.






            share|improve this answer


























            • Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

              – Darksaint2014
              Mar 28 '15 at 15:39














            0












            0








            0







            Are you using Putty to log in to DB server or some other server?



            If its DB server then, error can be caused by following




            1. Incorrect username/password

            2. Incorrect port number

            3. MySQL DB is not up and running


            If you are trying from different host to connect as in remote DB host make sure




            1. you have connectivity between the hosts and

            2. there is no IP based restrictions. As you know admin can restrict access to certain IP address.


            Hope this helped.






            share|improve this answer















            Are you using Putty to log in to DB server or some other server?



            If its DB server then, error can be caused by following




            1. Incorrect username/password

            2. Incorrect port number

            3. MySQL DB is not up and running


            If you are trying from different host to connect as in remote DB host make sure




            1. you have connectivity between the hosts and

            2. there is no IP based restrictions. As you know admin can restrict access to certain IP address.


            Hope this helped.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 4 '17 at 13:01









            hot2use

            8,59452458




            8,59452458










            answered Mar 27 '15 at 21:08









            Amk411Amk411

            11




            11













            • Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

              – Darksaint2014
              Mar 28 '15 at 15:39



















            • Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

              – Darksaint2014
              Mar 28 '15 at 15:39

















            Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

            – Darksaint2014
            Mar 28 '15 at 15:39





            Yes I am in fact using putty, So I am using Putty to ssh into the linux machine and trying to send the connection to the server through there. And I have made sure that I can at least ping the 172 computer through putty so it is listening and not just receiving.

            – Darksaint2014
            Mar 28 '15 at 15:39


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • 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%2fdba.stackexchange.com%2fquestions%2f96490%2funable-to-get-any-type-of-connection-using-mysql-on-lan%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

            Liste der Baudenkmale in Friedland (Mecklenburg)

            Single-Malt-Whisky

            Czorneboh