STEP 1. 下載 至MySQL官網下載免安裝版 MySQL Downloads STEP 2. 設定(MySQL 5.X) 解壓縮後,底下有my-huge.ini的設定檔案,把檔案複製一份,更名為my.ini, 然後,設定編碼及路徑 在 [client] 加入以下設定: # set character set default-character-set=utf8 在[mysqld]加入以下設定: # set basedirto your installation path basedir=d:/mysql #set datadir to the location of your data directory datadir=d:/mysql/data # set character set character-set-server=utf8 # set character collation collation-server=utf8_general_ci 路徑是要看mysql放在哪裡而定。 STEP 3. 安裝 開啟cmd mode後,打指令~ d:\mysql\bin\>mysqld --install MySQL --defaults-file=d:\mysql\my.ini –defaults-file 的用意是強制指定 my.ini 的位置,否則就需要把 my.ini 放到 C:\Windows 底下 (個人不建議) 。 STEP 4. 開啟mysql d:\mysql\bin\>net start mysql STEP 5. 登入mysql 預設帳號:root,預設密碼:空白 d:\mysql\bin>mysql -u root -p 會要求輸入密碼,預設為空白,第一次登入使用空白 出現「welcome to the mysql monitor」 mysql> 表示已成功。 STEP 6. 改密嗎 mysql>set password for 'root'@'localhost'=password('新密碼'); Que...
留言
張貼留言