SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast Redheadskater's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can't connect to mysql server on local host

    For those of you getting the "can't connect to mysql server on 'local host'" message:

    I have been tackling this issue for the past four days and with some guided direction from drzoid in the 'configure your server' forum, I've figured out how to get rid of that annoying error message. It was my firewall.

    I am running Norton and here's what I did:
    1. Open Norton and click on personal firewall > configure
    2. In the new windows click on the tab that says Program Control
    3. Find your programs ( for me mysql.exe and mysqld-nt.exe) and click on them
    4. Change your internet access to Permit All

    Afer I made these changes I was able to finally start doing mysql commands at the command prompt.

    I am posting this here in the hopes that the next person who stumbles across this problem will do a search in these forums and find this message. Maybe I'll save someone four days of headache!
    Lisa
    ~~~~~~~~~~
    Time flies - it's up to you to be the navigator.

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps it also helps if you try connecting to 127.0.0.1, when Apache doesn't need to pass your firewall.

    (Correct me if I'm wrong )

  3. #3
    SitePoint Member
    Join Date
    Jun 2004
    Location
    US
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Regarding Norton Personal Firewall

    Unfortunately 127.0.0.1 is the same as localhost and will not work either. The only way around this is as posted above as far as I can see.

  4. #4
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Ontario
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Redheadskater
    I am running Norton and here's what I did:
    What do I do if I'm getting the same error - but I'm not running Norton, I just have the WinXP Home Edition

  5. #5
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having real problems installing MySQL 4 on my machine.

    Having tracked it down, it has to do with the localhost not connecting. I tried your suggestion of allowing access via my firewall program.

    Here is the error problem:

    Connecting to localhost...Could not open connection to the host, on port 3306. No connection could be made because the target machine actively refused it.
    What do I do to resolve this problem? I really need some help with this.

    Many thanks for your help!

  6. #6
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've now resolved this issue, at least with my machine.

    This is what I did.

    1) I tried running winmysqladmin.exe
    2) This gave me an error saying it was missing a .dll file
    3) I downloaded a different version of MySQL, one where installation was not required, and I could just dump the mysql files/folders - I backed up my tables before doing this.
    4) Removed the my.ini file that mysql uses and the folder, I tried to make the mysql folder to basically start from scratch.
    5) I got winmysqladmin.exe to run this time without any problems - but localhost kept complaining.
    6) I stopped the mysql service and looked at the documentation and tried assigning a new password to mysql (its in the documentation)
    7) I changed the password and I made a few changes - and at last it worked - no errors!

    Thanks.

  7. #7
    SitePoint Zealot grantus's Avatar
    Join Date
    Apr 2003
    Location
    TX
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Me too I've been having this problem. MySQL was working fine but now it says "stopped".

    I went to Control Panel>Administrative Tools>Services and under MySQL I clicked on "Start" but it gives me this error message:
    "Could not start the MySQL service on local computer. Error 3: The system cannot find the path specified."

    What the hell is that? Anyone have any idea of how I can fix this? I've already re-installed MySQL a few times but same thing.

    Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •