MySQL綠色版安裝,很簡單按照下面的方式很快就能夠實現了。html
1.下載地址mysql
https://dev.mysql.com/downloads/mysql/ sql
百度網盤連接:https://pan.baidu.com/s/1ieuZsB095CnH61cEBa6Hxg 提取碼:1k08數據庫
2.配置my.ini 文件ui
解壓下載文件到指定目錄。如: spa
my.ini文件內容:命令行
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [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. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... basedir=D:\DEVELOPERS\mysql-5.7.9-winx64 datadir=D:\DEVELOPERS\mysql-5.7.9-winx64\data port=3306 max_connections=500 character-set-server=utf8 default-storage-engine=INNODB server_id=1 # 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_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
3.執行安裝mysql 3d
cmd命令令行進入文件目錄: code
執行mysqld install 命令,出現以下提示,安裝成功。 server
Service sucessfully installed.
注: 如出現 Install/Remove of the Service Denied 請使用管理員啓動命令行。
4.初始化數據庫
執行 mysqld --initialize 命令沒有輸出提示。
root 密碼初始化在data文件夾 *.err 文件中:
5.啓動mysql服務
執行 net start mysql
注:啓動mysql服務能夠在任意路徑下,必須以管理員方式運行的命令行。
6.進入mysql
執行 mysql -u root -p #注:這個命令只能在mysql的bin文件路徑下執行。
輸入密碼,進入系統。
7.修改root密碼
執行 set password for root@localhost = password('123456');
8.添加環境變量(可選)
進入數據庫查看數據庫實例: