MySQL绿色版 官网下载+安装(win7)
MySQL綠色版 官網(wǎng)下載+安裝(win7)
1.官網(wǎng)下載
? ? 官網(wǎng)地址:http://www.mysql.com/downloads/
點擊Windows
點擊MySQL Installer
點擊MySQL Server
點擊MySQL Community Server 5.6
下載64位的壓縮包版
? ? ? MSI Installer/ZIP Archive:自動配置的安裝版本/手動配置的壓縮版本
點擊 “No thanks, just start my download”開始下載
解壓
解壓下載好的.zip文件,文件夾內(nèi)容如下圖,移動文件夾mysql-5.6.29-winx64到你想要的位置。
2.修改my.ini文件
1)移動文件mysql-5.6.29-winx64到到D:\PHP,并重名為MySQL5.6。【解壓路徑最好不要用中文。】
2)在目錄D:\PHP\mysql5.6下,把my-default.init復(fù)制一份,并重命名為my.ini。
配置my.ini
注意:配置文件的內(nèi)容可以參照官網(wǎng)提供的配置文件的解說文檔修改,根據(jù)需要在原有基礎(chǔ)上修改或添加。
文件里面的參數(shù)配置,修改后: <span style="font-family:Microsoft YaHei;font-size:10px;"><span style="font-family:Microsoft YaHei;font-size:10px;">[WinMySQLAdmin] # 指定mysql服務(wù)啟動啟動的文件 Server=D:\\PHP\\mysql5.6\\bin\\mysqld.exe [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # 設(shè)置mysql的安裝目錄 如果目錄中帶空格則必須加引號 basedir = D:\PHP\mysql5.6 # 設(shè)置 mysql 數(shù)據(jù)庫的數(shù)據(jù)的存放目錄,文件夾名必須是 data datadir = D:\PHP\mysql5.6\data # 設(shè)置mysql服務(wù)器的字符集 character_set_server = utf8 # 設(shè)置端口號 port = 3306 # server_id = ..... [client] # 設(shè)置mysql客戶端的字符集 default-character-set = utf8 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M # 表示SQL模式的參數(shù),通過這個參數(shù)可以設(shè)置檢驗SQL語句的嚴格程度 # sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES </span></span>
3. MySQL安裝
命令安裝
cmd命令行到MySQL下面的bin目錄,錄入命令【mysqld --install mysql --defaults-file="D:\PHP\mysql5.6\my.ini" 】安裝。
安裝成功驗證
1)開始-->運行-->services.msc-->確定(或回車鍵Enter)
2)服務(wù)列表中查看Apache服務(wù),存在說明安裝成功。
4.系統(tǒng)環(huán)境變量的配置
?1)“計算機”右鍵 → “高級系統(tǒng)設(shè)置” → “高級” → “環(huán)境變量”
新建變量MYSQLD_HOME
2)點擊系統(tǒng)變量的“新建”→ 變量名"MYSQLD_HOME" → 變量值“D:\PHP\mysql5.6”(MySQL安裝路徑)→ “確定”
? ? ?注意:變量值后面不能添加分號“;”,否則配置不成功。
path變量值追加
3)點擊系統(tǒng)變量的“編輯”(沒有時新建)→ 變量名"Path" → 變量值“%MYSQLD_HOME%\bin”(MySQL的bin目錄的路徑)→ “確定”
? ? ?注意:變量值后面的分號“;”必須是英文分號。path:操作系統(tǒng)提供的環(huán)境變量。classpath:程序中引用的類所在的路徑。
4)設(shè)置成功后,手動重啟cmd,錄入命令[ httpd -help ]。若是沒有提示“不是內(nèi)部或外部命令”,說明系統(tǒng)環(huán)境變量配置成功。
5.MySQL服務(wù)常用的命令
啟動服務(wù):
<span style="font-family:Microsoft YaHei;font-size:10px;"><span style="font-family:Microsoft YaHei;font-size:10px;">net start mysql</span></span>停止服務(wù):
<span style="font-family:Microsoft YaHei;font-size:10px;"><span style="font-family:Microsoft YaHei;font-size:10px;">net stop mysql</span></span>
刪除服務(wù):
<span style="font-family:Microsoft YaHei;font-size:10px;"><span style="font-family:Microsoft YaHei;font-size:10px;">mysqld remove mysql</span></span>
6.修改mysql的初始密碼
初始用戶名:root ?/ ?初始密碼:空
<span style="font-family:Microsoft YaHei;font-size:10px;"><span style="font-family:Microsoft YaHei;font-size:10px;">mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass') 按Ctrl+C退出當(dāng)前錄入,“\q”退出mysql</span></span>
原文地址https://blog.csdn.net/anndy_/article/details/51093326
總結(jié)
以上是生活随笔為你收集整理的MySQL绿色版 官网下载+安装(win7)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sai怎么导出为jpg或png格式 sa
- 下一篇: mysql逻辑备份之mysqldump