window環境mysql解壓版配置

來源:互聯網
上載者:User

標籤:

1、下載並解壓

到官網下載mysql-5.5.10-win32.zip,然後將mysql解壓到任意路徑,如:C:\mysql-5.5.10-win32 

2、設定環境變數

開啟電腦->屬性->進階系統設定->環境變數,建立一個環境變數,變數名為:MYSQL_HOME,變數值為你的mysql根目錄,如:C:\mysql-5.5.10-win32 
然後在系統變數Path中添加:;%MYSQL_HOME%\bin

3、安裝mysql服務

以管理員身份開啟命令提示字元,執行命令:mysqld -installmysql服務安裝到windows的服務

註:如果要卸載mysql服務,執行:mysqld -remove

4、啟動mysql服務

執行:net start mysql

註:如果要停止mysql服務,執行:net stop mysql

5、設定密碼

輸入mysql -uroot進入mysql(預設root密碼為空白)

執行

mysql> use mysql ;
mysql> update user set password=password("new_pass") where user="root"; 
mysql> flush privileges; 
mysql> exit ;

6、登入

輸入mysql -uroot -p斷行符號

輸入密碼

 

註:

忘記密碼

在my.ini中加入

[mysqld]
#跳過密碼驗證
#skip-name-resolve

然後在cmd中直接輸入mysql -uroot 進去,然後執行1中的步驟

window環境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.