Navicat connection MySQL appears 2003--can ' t connect to MySQL server on localhost (10061) raised about life thinking)

Source: Internet
Author: User
Tags mysql in
(0) Directory

It ’s a lifetime, it ’s a lifetime.

Navicat connected to mysql appeared 2003-can't connect to mysql server on localhost (10061)

One: cause

(0) Due to a recent illness, I have been thinking about the following issues during my free time (ie during illness):

Thinking one: How to be a qualified program ape, how to become a program program a veritable one?

Thought two: There is still the end, it is not worth staying up late to work on R & D (or transform or do other IT positions relatively easy ~~~ I ca n’t give an answer to this question for a while, I hope you will help me analyze it, be grateful !!!)

(1) If you haven't done this, how can you say that you are a qualified program ape-when you install a program or run a development program, you never see or analyze the "very friendly running prompt information", and directly enter back Car key; I didn't know what I was doing at the end? ----- Who can blame it? The friendly prompts of others are ignored by you. . .

(2) As soon as I encounter a program or software that is not responding, I dance with my own hands — click here or there with a mouse — computer machines are also similar to human brains, and sometimes tired (memory exhaustion, cup exhaustion), Your mouse click will only increase its burden; even more terrible is that this situation migrates to the linux environment and executes a command by itself (especially if you are not familiar with this command), the system cursor is always blinking there without any Reaction-I will dance again and again-kill process, ctrl + z, ctrl + d, etc. I do not know if there is no prompt in Linux is the best prompt, some commands need to be executed in the background for a long time. . .

(3) How can you say that you have n’t done this? You are a veritable program ape—when you encounter a system error or a program error, you scratch your head, get confused and wait for rescue. You do n’t analyze the problem yourself and solve the problem yourself. What is more, to avoid and evade the problem. Not to mention, you have been working hard for three or five days for a problem. Of course, you cannot experience the happiness of a real programmer after solving the problem.

(4) I hope that I can move towards "just qualified" programmers ~~~

Two: The problem of foolishness



(1) Well before, suddenly the navicat tool connected to mysql appeared 2003—can’t connect to mysql server on localhost (10061) (three days)

Step 1: Troubleshoot the problem. First, under cmd, you can use commands to connect, and you can use programs to connect to mysql. You can also connect to some tables and report inexplicable error messages (the following will explain the cmd leveling mysql process of)

cmd connect mysql

   Enter the mysql bin directory under cmd, and enter: mysql -u root -p, followed by the enter password that appears: enter password, and enter the mysql database. mysql> show databases; will list all databases. At this point, the table name is connected to the mysql database, and the subsequent steps will not be repeated.

Step 2: In this case, is it not a problem with navicat itself, first check the IP and port number of the link, as well as the account and password; finally uninstalling and reinstalling navicat is still useless

navicat connect mysql

   Select MySQL for Connection in navicat, and then a New Connection dialog box appears. Enter a connection name in the Connection Name, such as: test, Host Name / IP Address, enter localhost or 127.0.0.1 (the database is installed on this machine) , Port is the default 3306, User Name is also the system's default root, Password enter the password set when installing MySQL, and then click Test Connection below, the result is 2003-can't connect to mysql server on localhost (10061). I use mysql 5.5. Version, it also comes with a GUI database tool mysql workbench, using this tool even the above error. The same goes wrong with sqlyog.

Step 3: Find Teacher Bai and Teacher Gu:

1) First of all, let me describe my problem: well before, suddenly the navicat tool connected to mysql appeared 2003-ca n’t connect to mysql server on localhost (10061)

cmd can be linked, programs can be linked (this shows that there are no problems with the account password and port number, and of course the service is turned on)

(Complains) How can there be the result of your problem among a lot of results of Baidu Google?

2) First say the correct result. This is a long-time search, and finally got the correct result from a forum. Why did Baidu and Google eat it? ---- Just complaining, because after all it is a search engine! !! !!

Positive solution: I also encountered the same problem, and finally found a solution on the Internet. The landlord tried this method:
Modify my.ini file, put
bind-address = 127.0.0.1
Change to
bind-address = 0.0.0.0
If not, add it (I am the case, then navicat can finally connect!) (Problem solved)
3) The most results returned by Baidu are as follows: (these results are not wrong, the mistake is more tricky)

Analysis of the problem: This sentence means "cannot connect to the MYSQL service on the host (named localhost)". Since the connection is not possible, the reason may be: (neither)

1 ---- MYSQL service does not exist on the host localhost; 2 ---- MYSQL service exists on the host, but the service is not started. Of course, the username or password cannot be wrong here (because the prompt is the same)
Solve the problem: Eliminate the possible causes of the problem one by one. 1 --- The host name here is localhost, if localhost does not point to the IP127.0.0.1 of this machine, so the solution for the first possibility is to check c: // windows / system32 / drivers / etc / hosts.txt file, check whether localhost points to the local IP address 127.0.0.1.

2--If the service is not started. Then right-click ‘Computer’ ----> Management ---> Services and Applications ----> Services, and find the service named MYSQL in the right column. At this time, his status should be empty, that is, not started, it is OK to start this service.

3: Personal experience

(0) Think about it yourself. Only when you are sick can you have a mood to think, or you can think about it calmly-take money lightly and interests down ~~~ put down the burden and start thinking; "when you are sick", yes Isn't it a bit sad?

(1) Thinking 1: How to be a qualified program ape, and how can you become a program program? (Basic solution)

(2) Thought 2: There is still the end, it is not worth staying up late to work on R & D (or transform or do other IT positions relatively easy ~~~ For this question, do a survey, I hope you all reply to me, be grateful! !!!)


Navicat connected to mysql appeared 2003-can't connect to mysql server on localhost (10061) thinking about life)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.