Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Unanswered: 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

  2. #2
    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

  3. #3
    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.

  4. #4
    Join Date
    Sep 2003
    Posts
    69
    Why would iptables/chains be setup to block things internally?

  5. #5
    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?

  6. #6
    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).

  7. #7
    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

  8. #8
    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.

  9. #9
    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!

  10. #10
    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!

  11. #11
    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

  12. #12
    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.

  13. #13
    Join Date
    Mar 2004
    Posts
    5
    Thanks a lot!

    Cheers,

    Sharon

Posting Permissions

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