对于32位和64位都是可以的。
1.复制mysql-5.6.14-win32.zip到D:\目录下.
2.解压mysql-5.6.14-win32.zip
3.在D:\mysql-5.6.14-win32下,
复制“my-default.ini”文件,生成“复件 my-default.ini”文件。将“复件 my-default.ini”文件重命名成“my.ini” 。
修改其中的内容如下:
<pre name="code" class="html"># 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. [client] default-character-set=utf8 [mysql] default-character-set=utf8 [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:\\mysql-5.6.14-win32 datadir = D:\\mysql-5.6.14-win32\\data port = 3306 #自定义主机ID识别符,用于主从或多服务器之间识别,为 一个 int 类型 server_id = 1 character_set_server=utf8 # 最大连接数量 max_connections = 100 #CREATE TABLE 语句的默认表类型,如果不自己指定类型,则使用下行的类型 default-storage-engine = InnoDB # 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
二、
将D:\mysql-5.6.14-win32\bin配置到环境变量的path路径中。
三、安装mysql为windows服务。
d:\mysql-5.6.14-win32\bin\mysqld.exe -install mysql
一定要指定全路径,否则,可能找不到文件。
然后启动mysql服务。
四、登录修改mysql密码
cmd进入命令行
mysql -u root -p
回车 回车
进入数据库。
use mysql;
select host,user,password from user;
update user set password = PASSWORD('123456A') where user = 'root';
最后不要忘记
flush privileges;
更新OK。
exit退出。然后重新登录即可。