MySQL安裝遇到的問題

來源:互聯網
上載者:User

標籤:data   修改   direct   ror   root使用者   服務   ant   roo   修改密碼   

1、MYSQL服務啟動出現錯誤。

MySQL ‘localhost‘ (10061)

我這裡遇到的問題是如下解決的:

my.ini檔案裡
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/tools/MYSQL5.5/"

#Path to the database root
datadir="D:/tools/MYSQL5.5/Data/"

datadir需在basedir目錄的下一層,如上所示。

此時,MYSQL服務可以啟動啟動起來了。

接下來又遇到一個問題: Access denied for user ‘root‘@‘localhost‘(using password:YES) ERROR 1045(28000)

需要重新設定root使用者的登入密碼,步驟如下:

1、首先在my.ini檔案的最末尾加上 "skip-grant-tables"

2、重啟MYSQL服務

3、此時可以通過mysql -u root -p登入到mysql伺服器

4、修改密碼,步驟如下:

a.輸入如下語句:

use mysql;update user set password = PASSWORD(‘新密碼‘) where user = ‘root‘;

b. 刪除或注釋掉my.ini的 "skip-grant-tables"

c. 重啟MYSQL服務

MySQL安裝遇到的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.