Mysql安裝完畢運行時沒有 mysql 和 performance_schema 資料庫,performanceschema

來源:互聯網
上載者:User

Mysql安裝完畢運行時沒有 mysql 和 performance_schema 資料庫,performanceschema



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


  Mysql安裝完畢運行時沒有 mysql 和 performance_schema 資料庫

問題一:之前卸載未卸載乾淨

問題二:沒有管理員權限進入

問題三:登入時,密碼是空,使用的是匿名方式登入


Windows系統下

方法一:
在安裝路徑下的my.ini的[mysqld]欄位加入:  skip-grant-tables
 
重啟mysql服務,這時的mysql不要求輸入密碼即可登入資料庫然後進入mysql 
mysql>use mysql;
mysql>update user set password=password('新密碼') WHERE User='root'; 
mysql>flush privileges;
 
運行之後最後去掉my.ini中的skip-grant-tables,重啟mysqld即可。

視頻聯結地址:http://www.tudou.com/programs/view/ZeHXZx4G6dk/

修改mysql密碼方法二:
不使用修改my.ini重啟服務的方法,通過非服務方式加skip-grant-tables運行mysql來修改mysql密碼停止mysql服務
開啟命令列視窗,在bin目錄下使用mysqld-nt.exe啟動,即在命令列視窗執行: mysqld-nt --skip-grant-tables
然後另外開啟一個命令列視窗,登入mysql,此時無需輸入mysql密碼即可進入。
按以上方法修改好密碼後,關閉命令列運行mysql的那個視窗,此時即關閉了mysql,如果發現mysql仍在啟動並執行話可以結束掉對應進程來關閉。
啟動mysql服務。









mysql中performance_schema是什資料庫

MySQL 5.5新增一個儲存引擎:命名PERFORMANCE_SCHEMA ,主要用於收集資料庫伺服器績效參數。MySQL使用者是不能建立儲存引擎為PERFORMANCE_SCHEMA的表

performance_schema提供以下功能:
1.提供進程等待的詳細資料,包括鎖、互斥變數、檔案資訊;
2.儲存曆史的事件匯總資訊,為提供MySQL伺服器效能做出詳細的判斷;
3.對於新增和刪除監控事件點都非常容易,並可以隨意改變mysql伺服器的監控周期,例如(CYCLE、MICROSECOND)

通過以上得到的資訊,DBA能夠較明細得瞭解效能降低可能是由於哪些瓶頸?

l performance_schema功能開啟和部分表功能

Performance的開啟很簡單,在my.cnf中[mysqld]加入performanc_schema,檢查效能資料庫是否啟動的命令:

SHOW VARIABLES LIKE ‘performance_schema’;

若是返回的 值為ON,則說明效能資料庫正常開啟狀態。
 
mysql的資料庫檔案存在什地方?按照網上的方法找不著具體描述見問題補充

在my.ini中
下面basedir是MYSQL安裝路徑
basedir="C:/Program Files/MySQL/MySQL Server 5.1/"
下面datadir是MYSQL資料庫所在的路徑
datadir="C:/Documents and Settings/All Users.WINDOWS/Application Data/MySQL/MySQL Server 5.1/Data/"
 

相關文章

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.