win7 mysql 啓動 問題

>net start mysqlhtml

1 mysql服務沒法啓動 系統錯誤 1067mysql

 

解決方法:sql

1 多是my.ini 的配置問題數據庫

2 可能mysql 的 默認端口被佔用:ide

 

C:\Users\ustc>netstat -aon|findstr "3306"
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING       3176
  TCP    [::]:3306              [::]:0                 LISTENING       3176

 

 

查看佔用了端口 3306 的進程。this

tasklist|findstr "3176"spa

殺死進程code

taskkill /f /pid 3176htm

再從新啓動 mysql。blog

2 . net start mysql 時 服務名無效的問題

mysql服務沒有安裝。

解決辦法: 在 mysql bin目錄下 以管理員的權限 執行 mysqld -install命令

而後仍然以管理員的權限 net start mysql 開啓Mysql服務了。

附卸載mysql服務的方法。

一、以管理員的權限 net stop mysql ,關閉mysql服務

二、以管理員的權限 mysqld -remove ,卸載mysql服務

3 . 已存在的庫,可是show databases; 沒有顯示出來 

網上有解釋:http://storysky.blog.51cto.com/628458/504406/

說my.ini中

mysql手冊,裏面是這樣解釋skip-show-database的

  With this option, the SHOW DATABASES statement is permitted only to users who have the SHOW DATABASES privilege, and the statement displays all database names. Without this option, SHOW DATABASES is permitted to all users, but displays each database name only if the user has the SHOW DATABASES privilege or some privilege for the database. Note that anyglobal privilege is considered a privilege for the database.

,原來若是不加這個選項全部的用戶均可以 show databases的,只不過看到的只有本身有權限的庫而已。若是 Show_db_priv: Y 的話估計就表示這個用戶對全部數據庫都有show databases權限了。

因此 我本來啓動mysql後,mysql 進入,show databases; 沒有顯示 我原來建立的數據庫,

可是當我mysql –u root 進入,就顯示所有的了。

(另外,對我說...數據庫目錄都在F盤,之後別亂找了)

相關文章
相關標籤/搜索