Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ODBC 3.51 Driver Can't connect to MySQL server on localhost (10061)

Tags:

mysql

Exactly what the title said; I'm trying to configure an ODBC connection for MySQL 5.0, but upon clicking Test Data Source, it returns the above error.

I'm pretty sure most of you have seen this question before, and I did do some research before thinking about posting this, but so far, none of what I found and tried were able to help.

I'm using MySQL 5.0, running on Windows 7 32-bit. I can browse the database fine with the MySQL Query browser which means (I'm assuming) that the username and password are fine.

There is a 'MySQL 5 - Started' under Services. I named it that way because I had installed an older version of MySQL (3, iirc) for a project. Since I don't need it yet, I disabled it (it's not running).

Here's what I tried:

  • Firewalls were disabled to begin with.
  • Replacing the 'localhost' with '127.0.0.1' (Didn't work)
  • Going into Command prompt, cd to C:\Program Files\MySQL\MySQL Server 5.0\bin, and executing mysqld-nt (I have no idea what that is for, but it didn't do anything)
  • Running 'Telnet localhost 3306' in the Command Prompt returns 'Could not open connection to the host , on port 3306: Connect failed.
  • Stopping the service, going into C:\Program Files\MySQL\MySQL Server 5.0\data, deleting ib_logfile0, ib_logfile1, and ibdata1, and then restarting the service (Didn't work).

I'm assuming here that it might have something to do with the port 3306, as typing netstat -a in the command prompt gets me a list with no 3306 in it (as far as my eye can tell), so I'm not really sure how to proceed (port forwarding? Don't know how to do that).

Any help would be much appreciated. Thanks.

like image 671
zack_falcon Avatar asked Nov 13 '22 06:11

zack_falcon


1 Answers

I had same problem before, please check your Mysql Service and make Startup Type as Automatic and Restart.

enter image description here

like image 116
yusuf hayırsever Avatar answered Nov 15 '22 07:11

yusuf hayırsever