我用的版本:链接:https://pan.baidu.com/s/1vZ2EcadTq4Z–xhJF2mOtg 密码:6g1x 如果需要其他版本的,可以自行到官网下载。
将MySQL压缩包解压到自己指定的位置。 我的位置为:D:\DevelopmentTools\mysql-5.6.19-winx64
在Windows环境变量中配置path,在path后面增加MySQL的bin目录,例如: ;D:\DevelopmentTools\mysql-5.6.19-winx64\bin; 注意用分号“;”隔开
在MySQL目录下,新建一个my.ini
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/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 = D:\\DevelopmentTools\\mysql-5.6.19-winx64 datadir = D:\\DevelopmentTools\\mysql-5.6.19-winx64\\data port = 3306 # server_id = ..... # 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进入MySQL的bin目录下,安装mysql
C:\Users\echo>D: D:\>cd Dev\mysql-5.6.19-winx64\bin D:\Dev\mysql-5.6.19-winx64\bin>mysqld –install // 安装mysql密码可为空,第一次登录,密码是空就行了
mysql -u root -p