When Mysql is installed and running, there is no mysql or performance_schema database, performanceschema

Source: Internet
Author: User

When Mysql is installed and running, there is no mysql or performance_schema database, performanceschema



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.









What database is performance_schema in mysql?

MySQL 5.5 adds a storage engine named PERFORMANCE_SCHEMA, which is used to collect database server performance parameters. MySQL users cannot create tables whose storage engine is PERFORMANCE_SCHEMA.

Performance_schema provides the following functions:
1. provide detailed information about the process wait, including the lock, mutex variable, and file information;
2. Save historical event summary information to provide detailed judgment on MySQL server performance;
3. It is very easy to add or delete monitoring event points, and you can change the monitoring CYCLE of the mysql server at will, for example (CYCLE, MICROSECOND)

Based on the information above, the DBA can be more detailed about the bottlenecks that may cause the performance degradation?

L performance_schema function enabled and some table functions

It is easy to enable Performance. In my. cnf, [mysqld] is added to ipvc_schema and the command to check whether the Performance database is started is as follows:

Show variables like 'performance _ scheme ';

If the returned value is ON, the performance database is enabled normally.
 
Where does the mysql database file exist? You cannot find the specific description according to the online method. For more information, see add question.

In my. ini
The following basedir is the MYSQL installation path.
Basedir = "C:/Program Files/MySQL Server 5.1 /"
The following datadir is the path of the MYSQL database.
Datadir = "C:/Documents and Settings/All Users. WINDOWS/Application Data/MySQL Server 5.1/Data /"

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.