How to exit the interface after the mysql database enters the password (detailed method) and mysql enters the password

Source: Internet
Author: User

How to exit the interface after the mysql database enters the password (detailed method) and mysql enters the password

Some time ago, I downloaded one from my book because I needed to write a program to use a database, but there were many minor problems (my desktop did not solve this problem, maybe my book is too scum.) After a long tangle, let's look back and find out, analyze, and solve the problem. Isn't it our software management philosophy, only those who have experienced problems can be deeply understood. I don't need to talk much about it. I just want to answer the question.

After downloading mysql, when you open the mysql character interface (MySQL 5.5 Command Line Client), enter the password (manually set in the Wizard during installation ). A burst of sound appeared, and then the screen ended. I installed mysql 5.5 in front of the computer for a while. It was okay when I started using it, but suddenly, after I enter the password on the interface, the screen will pop up, and the visual management tool (I use sqlyog) cannot connect to the database. I searched for it at night, I found this problem very common. I finally got it through a variety of methods (it was a torment during the period, and there was a kind of impulse to smash the computer). I would like to summarize it here.


Method 1: If a pop-up screen is displayed, first check whether the mysql service is enabled. The method is as follows: right-click "my computer"> "management"> "services and applications"> "services" to view the mysql service status. if the service is not started, right-click to start the service. On the restart page, enter the password to check whether the password is correct. Generally, the main reason is that the mysql service is not enabled. There are many incentives for this reason. After I used a free anti-virus software optimization last time, the mysql service was accidentally disabled, so pay special attention to it during optimization. For example:



 

 

Case 2:

If the first method does not work or the "mysql service" is enabled, it is likely that the mysql configuration is faulty. In fact, the problem occurs in "C: \ ProgramFiles \ MySQL Server 5.0 "my. INI file (under the installation path). This configuration file is faulty. For this problem:

Method 1: First, go to cmd to switch to the MySQL installation directory, then enter the bin directory, and enter the mysqld-nt -- skip-grant-tables command.

Do not close this cmd window first. open another window to log on to MySQL or directly open MySQL CommandLine Client and enter the correct password. You can.




Method 2: Find the running (win + R), In this DOS form, cd to the bin directory of MySQL Server 5.5 (Press ENTER ), then mysql-u root-p (Press ENTER) and Enterpassword: enter the password.


Method 3: If the logon prompt "mysql: unknownvariable 'character-set-server = gbk'" is displayed, modify my. INI file, comment out or delete the default-character-set = gbk in it, and restart the mysql service in the Service (I have never met this case, but I will try it later ),



Double-click to open it, find the corresponding location, and modify it.




Method 4: Go to the installation directory and delete the "my. ini" file,

Note: In method 2, when we enter the "mysqld-nt -- skip-grant-tables" command in dos, it may be unrecognized (the prompt is not an internal or external command, directly start mysql with the error XXX can't connect to mysql server on 'localhost' (10061), solution: locate the my-small.ini (this file is under the installation directory) copy and save as my. ini adds bind-address = 0.0.0.0 to [mysqld ].

Unrecognized:


Solution:


Then start mysql to connect.


Enter the password:


 

The above method is a summary of the methods found on the Internet. In addition, with my own hands-on practice, these methods can solve the above problems, the uninstallation of the re-installation, the precautions for the re-installation, see (mysql uninstall precautions http://blog.csdn.net/u014028070/article/details/41895367 ).

Related Article

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.