MySQL Installation failed-error Nr. 1045

Source: Internet
Author: User
Tags mysql command line netbeans

After the windows 7 system is installed, mysql 5.134 cannot be installed when the ROR environment is configured. The problem occurs in the last step. The specific error is as follows:

Unload and reload.

Simply remove all mysql items, including the registry, but this is still the case. The installation was successful before.

So I turned to the Internet for help. below is the solution I found. But for me, I tried it and didn't work, but I still listed it. Maybe you can use it.

{
This. style. display = 'none'; document. getelementbyid ('Code _ closed_text_110513 '). style. display = 'none'; document. getelementbyid ('Code _ open_image_110513 '). style. display = 'inline'; document. getelementbyid ('Code _ open_text_110513 '). style. display = 'inline ';
} "Id =" code_closed_image_110513 "> {
This. style. display = 'none'; document. getelementbyid ('Code _ open_text_110513 '). style. display = 'none'; getelementbyid ('Code _ closed_image_110513 '). style. display = 'inline'; getelementbyid ('Code _ closed_text_110513 '). style. display = 'inline ';
} "Id =" code_open_image_110513 "style =" display: none "> method 1
The solution is to reset the root user password. The procedure is as follows on Windows:

1. log on to the system as a system administrator;

2. If the MySQL server is running, stop it.

If the server runs as a Windows Service, go to Service Manager: Start Menu-> Control Panel-> Administrative Tools-> services

If the server is not running as a service, you may need to use the task manager to force it to stop.

3. Create a text file and place the following commands in a single line:

Set password for 'root' @ 'localhost' = PASSWORD ('mynewpassword ');

Save the file with any name. In this example, the file is C: \ mysql-init.txt.

4. Enter the doscommand prompt: Start Menu-> Run-> cmd

Assume that you have installed MySQL to C: \ mysql. If you install MySQL in another location, adjust the following commands.

Run the following command at the doscommand prompt:

C: \> C: \ mysql \ bin \ mysqld-nt -- init-file = C: \ mysql-init.txt

When the server is started, run the "-- init-file" option (function: Read SQL commands from the specified file at startup) to change the root user password. When the server is successfully started, delete the C: \ mysql-init.txt.

5. Stop the MySQL server and restart it in normal mode. If you run the server as a service, you should start it from the Windows service window. If the server is started manually, the command can be used as usual.

The new password should be used for connection.

It is completely useless.

 

 

{
This. style. display = 'none'; document. getelementbyid ('Code _ closed_text_110741 '). style. display = 'none'; document. getelementbyid ('Code _ open_image_110741 '). style. display = 'inline'; document. getelementbyid ('Code _ open_text_110741 '). style. display = 'inline ';
} "Id =" Code_Closed_Image_110741 "> {
This. style. display = 'none'; document. getElementById ('Code _ Open_Text_110741 '). style. display = 'none'; getElementById ('Code _ Closed_Image_110741 '). style. display = 'inline'; getElementById ('Code _ Closed_Text_110741 '). style. display = 'inline ';
} "Id =" Code_Open_Image_110741 "style =" display: none "> method 2
If you can log on, you cannot log on. What password? Empty passwords have been tried, and direct error is disabled

Step 1: Open MYSQL's "MySQL Command Line Client" in the beginning and enter your password (that is, the one set during installation. If the password is incorrect, try to log on with a blank password, the password setting may be invalid during installation ).
Step 2: Enter the following command after Successful Logon:
Set password for 'root' @ 'localhost' = PASSWORD ('123 ');
The above 123456 is the password to be set, you can change it to your own.

 

 

{
This. style. display = 'none'; document. getElementById ('Code _ Closed_Text_111338 '). style. display = 'none'; document. getElementById ('Code _ Open_Image_111338 '). style. display = 'inline'; document. getElementById ('Code _ Open_Text_111338 '). style. display = 'inline ';
} "Id =" Code_Closed_Image_111338 "> {
This. style. display = 'none'; document. getElementById ('Code _ Open_Text_111338 '). style. display = 'none'; getElementById ('Code _ Closed_Image_111338 '). style. display = 'inline'; getElementById ('Code _ Closed_Text_111338 '). style. display = 'inline ';
} "Id =" Code_Open_Image_111338 "style =" display: none "> method 3
1. mysql-u root

2. use mysql

3. update user set password = old_password ('scf ') where user = 'root' and host = 'localhost ';

4. flush privileges;

 

In the end, the request is ignored.

Then run cmd and enter mysql-uroot. If the password prompt is displayed, press enter. The default password is blank, not a space.

This will go in. Show databases. You can also use it.

Then, use NetBeans 6.5 to create a rails project, operate the database, modify its configuration file, leave the password blank, and then create the database, migrate. The result is successful, but it is not found in mysql,

It should be the default service problem. Because NetBeans is localhost by default, log on to mysql again.

Mysql-hlocalhost-uroot # No Password

Go in and see the database. You can use it. What's wrong with him? You just need to use it. It's a waste of my time.

If any hero knows the problem, please tell me. I would be very grateful!

 

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.