1,在如下 地址下载 https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.35-winx64.zip
2,解压缩后放到 C:\Program Files\MySQL\mysql-5.6.35
注意解压缩后 需要重命名文件夹名称
3,覆盖mysql-default.ini my.ini 文件
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] character_set_server=utf8 # 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 = C:\Program Files\MySQL\mysql-5.6.35 datadir = C:\Program Files\MySQL\mysql-5.6.35\data # port = ..... # server_id = ..... [WinMySQLAdmin] Server = C:\Program Files\MySQL\mysql-5.6.35\bin\mysqld-nt.exe # 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 [client] port=3306 default-character-set=utf8
my-default.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 = C:\Program Files\MySQL\mysql-5.6.35 datadir = C:\Program Files\MySQL\mysql-5.6.35\data # port = ..... # 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
4、超级管理员进入到cmd命令界面,切换到
C:\Program Files\MySQL\mysql-5.6.35\bin 目录下面,执行下面命令:mysqld -install
5、启动mysql命令: net start mysql
6、设置默认用户名密码:
c:\...>mysql -uroot
mysql>SET PASSWORD FOR \'root\'@\'localhost\' = PASSWORD(\'123456\');
FLUSH PRIVILEGES;