If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to use mySQLCC to connect mySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-04, 23:30
shduan shduan is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
How to use mySQLCC to connect mySQL

Dear all,

I am trying to use mySQL as a GUI tool to connect mySQL server on my local machine and got error message:

"[root@localhost:10061] ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)."


I have no idea what I should do to get connected.


If any of you expert could help me with this issue, that will be greatly appreciated!!!

Thanks a lot!!!


New user
Sharon Duan
Reply With Quote
  #2 (permalink)  
Old 03-17-04, 01:56
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
Let me get this straight, you're using mySQLCC to connect to mysql on the local machine? If that is what you're saying and you cannot connect then it could be a few things:

1. User name and/or password could be wrong
2. You could be having local socket issue
3. The user name/password doesn't have the privs you need
Reply With Quote
  #3 (permalink)  
Old 03-17-04, 02:15
adamr adamr is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Re: How to use mySQLCC to connect mySQL

You might want to check if you have any firewall programs running in the background that are denying port access.
Reply With Quote
  #4 (permalink)  
Old 03-17-04, 02:19
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
Why would iptables/chains be setup to block things internally?
Reply With Quote
  #5 (permalink)  
Old 03-17-04, 02:32
adamr adamr is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
I remember running into a situation trying to telnet/ssh between two computers behind a firewall. For some reason, I just could not establish a connection.

After stopping the iptables service, I was able to start a session between these two comptuers. This involves port/socket access, and so does the current situation.

Its something worth checking out, do you agree?
Reply With Quote
  #6 (permalink)  
Old 03-17-04, 02:37
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
If you are talking about two computers on one network behind a NAT or Proxy, then there should STILL be no problem UNLESS each machine was running IP Tables/chain and blocking SSH (because I know you're not using telnet still :P). If you are refering to one computer outside the NAT or Proxy then of course a firewall will block the incoming host if the rules are set to do so.

As for port/socket access, anything networked (through sockets, forget other methods of IPC) uses an IP (or host name) and a port number. So I guess it could be something to check out, but it seems far fetched to me (then again I have seen users do some pretty funny things).
Reply With Quote
  #7 (permalink)  
Old 03-17-04, 08:15
shduan shduan is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
Question

Thanks so much for all your quick responses! I am so touching.

I will follow your instructions and try to do some efforts to figure this out. I am a junior programmer, so thank you for your patient for helping me through with this tough issue. I will try my best. If anything I still do not understand, I wish I could still get your guidance!

Thank again!!!

Sharon Duan
Reply With Quote
  #8 (permalink)  
Old 03-17-04, 15:49
sendres2 sendres2 is offline
Registered User
 
Join Date: Mar 2004
Posts: 11
Debugging?

Have you tried any of the debugging tools?

From your command screen, you can enter: C:\mysql\bin> mysqld --console and it will print out to your command screen sometimes helpful messages. If it works correctly, you'll end up seeing mysqld: ready for connections Version: '4.0.14-log' socket: '' port: 3306

You can also try looking at the .err file, where mySQL writes out issues. In the main folder where you installed your stuff, you should see a subfolder called data (`C:\mysql\data' is the typical location). The .err file is in there, and you can open and view it in Notepad.

Also, you're probably running on port 3306. If no other server is running, use your command screen to enter telnet your-host-name port-number (ex: telnet localhost 3306). If you don't get a message saying 'unable to connect', something else is using that port, which could explain why your DB can't connect.

Another thing you can do is make a trace file. In your command screen, type in mysqld -V. If the returned stmt says 'debug' at the end, you can use the debugging tools created for mySQL. On this page (http://www.mysql.com/doc/en/Making_trace_files.html) in the mySQL Manual it walks you through a couple options for doing traces.

These may not solve your problem... just a thought, and it might give you more info.
Reply With Quote
  #9 (permalink)  
Old 03-17-04, 18:15
shduan shduan is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
Thank you so much! I tryed to follow your step by step guidance, knowing that mySQL server is started, but could not access it through mySQLCC. I changed the host name and now get the following error message:
[root@localhost:3306] ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

the message from .err file is:
040317 17:50:37 InnoDB: Started
MySql: ready for connections.
Version: '4.0.17-nt' socket: '' port: 3306

When I type C:>telnet localhost 3306
it gives the following info from command window:

*
4.0.17-nt
u?{o<{wb,☻

Connection to host lost.

Thanks a lot!
Reply With Quote
  #10 (permalink)  
Old 03-18-04, 09:09
sendres2 sendres2 is offline
Registered User
 
Join Date: Mar 2004
Posts: 11
Try this

I was having a similar problem, and 'trieder' posted a reply to me which solved my issue right away. You might as well try it, just in case.

Go into your main mysql folder, and then the bin subfolder (usually C:\mysql\bin). There's a program in there called winmysqladmin. Double click on this, and it will open and you'll see a little traffic light in the bottom right of your desktop tray. Right click on the traffic light, click WINNT and you'll either see 'Install the Service' or 'Start the Service'. If you see 'Install the Service', click that. Now try to start your mysql server normally (the way you were originally).

If you see 'Start the Service', you can try that. The first time I did this, I got a message saying 'Failed to Start. Please wait 30 sec before trying again.' If this happens, select 'Remove the Service', then do the same thing and select 'Install the Service'. Now try to start normally. This resolved my issue, so I hope it helps you!
Reply With Quote
  #11 (permalink)  
Old 03-18-04, 19:53
shduan shduan is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
Thanks so much all you warm-hearted friends! I got the registered on the database through mysQLCC. Finally did try the your suggestions and finally connected to mySQL server. The problem is the username and password! I didn't use the right user account. Now I have found I forgot the root password. However when using any username with no password, I could always get connected.

The things is I need to change the root password and add some other users. Some document says:

"To assign passwords using SET PASSWORD, connect to the server as root and issue two SET PASSWORD statements, as follows:

shell> mysql -u root mysql
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');"

I am not really know what 'host_name' mean. Why I have to SET PASSWORD twice?

Thanks a lot!! I appreciate all your great help!

Sharon
Reply With Quote
  #12 (permalink)  
Old 03-19-04, 07:19
sendres2 sendres2 is offline
Registered User
 
Join Date: Mar 2004
Posts: 11
Once again, I could be wrong, but I believe you're pulling that from the mySQL manual, and I think it's just 2 examples. In your case, localhost is your host_name. Sometimes you set up the DB so it's not running locally -- ex, you can set it up to run on a different machine -- and in those instances you'd have to specify the host where it's running.
Reply With Quote
  #13 (permalink)  
Old 03-19-04, 11:11
shduan shduan is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
Thanks a lot!

Cheers,

Sharon
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On