No Mysql and performance_schema databases are available when mysql is installed and running.

Source: Internet
Author: User

No Mysql and performance_schema databases are available when mysql is installed and running.

Mysql ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: YES)

No Mysql and performance_schema databases are available when mysql is installed and running.

Problem 1: Previously uninstalled and not uninstalled clean

Problem 2: you do not have the Administrator permission to access

Question 3: When logging on, the password is blank and anonymous logon is used.

In Windows

Method 1:

Add skip-grant-tables to the [mysqld] field of my. ini in the installation path.

Restart the mysql service. At this time, mysql can log on to the database without a password and then enter mysql.

Mysql> use mysql;

Mysql> update user set password = password ('new password') WHERE User = 'root ';

Mysql> flush privileges;

After running the command, remove skip-grant-tables from my. ini and restart mysqld.

Video link: http://www.tudou.com/programs/view/ZeHXZx4G6dk/

Method 2:

Without modifying my. ini to restart the service, you can add skip-grant-tables to run mysql in non-service mode to change the mysql password to stop the mysql service.

Open the command line window and start it with mysqld-nt.exe in the bindirectory. That is, run mysqld-nt -- skip-grant-tables in the command line window.

Open a command line window and log on to mysql. You do not need to enter the mysql password.

After changing the password, close the window in which the command line runs mysql. In this case, mysql is closed. If mysql is still running, stop the corresponding process.

Start the mysql service.

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.