• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can't connect Mysql 5.2 server on '127.0.0.1' (10061)

 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I try to connect my mysql server it says "can't connect Mysql 5.2 server on '127.0.0.1' (10061)". I have opened the port and installed connector too.
I am following all the steps given in the following link for windows vista

http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-windows.html

Thanks in advance
 
Scott Selikoff
author
Saloon Keeper
Posts: 4007
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried connecting via MySQL Workbench (formerly GUI Tools)? This will let you know if the problem is with the server or with your application.
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott Selikoff wrote:Have you tried connecting via MySQL Workbench (formerly GUI Tools)? This will let you know if the problem is with the server or with your application.


yes that's what I have been doing..once we open MySQL workbench we can see three options..SQL Development, Data Modeling and Server Administration.

Underneath SQL Development there is an option NEW CONNECTION..that's how i am trying to connect but unable get connection.

Also if I try to setup connection by installing connector it is not getting connected and gives the same error..I have successfully made a connection of MSSQL and postgreSQL server through connector..
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mysql is usually a username at a client address, not just a username. % means any host, hence root@% would allow root to connect from anywhere. User@127.0.0.1 would allow that user to connect from the same machine Provided they specify localhost or ip in the jdbc url. If you use the host name or ip then the user needs permission from that host too, even though it is the same machine!
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to make connection using Connector/ODBC
I am entering the following values
DATA SOURCE NAME: Hiteshmysql
DESCRIPTION: mysqlconnection
TCP/IP SERVER: localhost PORT: 3306
USER: root
PASSWORD: root
DATABASE: Is it necessary to select databse from list? I don't get any any name here to select database so leave it blank.

When I click on TEST then it gives me following error...
"Connection Failed:[HY000][MYSQL][ODBC 5.1 Driver] Cn't connect to MySQL server on 'localhost' (10061)

help me guys.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using ODBC?
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't i need ODBC connector for connecting MYSQL workbench?

To make a connection in MySQL workbench..i am entering following values
Connection name: Big Iron Server
Connection Method: TCP/IP Server
Hostname:127.0.0.1 Port:3306
Password:root(store in vault)

after that if i click on test connection then it gives me following error
" Can't connect to MySQL server on '127.0.0.1' (10061)"
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also if i want write jdbc programs using eclipse and MySQL i need to make jdbcdbc connection, right?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4007
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your connecting to MySQL from a Java application, you should be using the Connector/J. Take a look at the following and go from there. ODBC sounds like its completely unrelated to what you're attempting to do.

http://dev.mysql.com/doc/refman/5.0/en/connector-j.html
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
right now I am not using any java application. I am learning MySQL workbench for that i have to make connection, right?
I am unable to make a connection using MySQL Workbench that's my main problem...
 
Scott Selikoff
author
Saloon Keeper
Posts: 4007
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK... Are you sure your server is running? Are you sure you are using the same port on both your client and server? Are you sure you don't have a firewall program blocking access? Also, try using localhost instead of 127.0.0.1, and make sure you have those connection properties allowed for that user.

Most of the time MySQL uses 3306 as the default port so after installing MySQL and Workbench on the same computer, the two can connect to each other pretty easily, unless blocked by a third party application.
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have checked the box in the windows firewall to make an exception for MySQL Workbench...and made a connection using NEW SERVER INSTANCE (Admin@127.0.0.1 Local Type:Windows) but it still says " There is no connection to the MySQL Server. This functionalit requires an established coonection to a running MySQL server to work".
 
pintu shah
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded the ZIPPED MySQL Server 5.2.29 from www.mysql.org and unzipped it. Finally I ran mysqld.exe which is located in the bin folder to start the server by manually clicking on the icon mysqld.exe. Now i can also make connection using MySQL workbench.

The Issue is now resolved.

Thank you everyone for your valuable suggestions. I appreciate them.
 
jai ddscsdds
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)when you installed mysql, you must have skipped networking because you are working on a local machine
result -->does not create a address field in your configuration file my.ini or my.cnf if its linux

2)When you install mysql workbench, it tries to connect from your given credentials and looks for that line in my.ini, which is not there.
so it can never connect even though mysql client can connect from shell

solution:

1)stop mysql
2)add this line to you server section of mysql configuration file

bind-address=127.0.0.1

3)Restart MySQL
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch, jai ddscsdds!.
 
marc dasi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS ...THANKS ...THANKS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic