win10安装mysql5.7.11_64位Win10系统安装Mysql5.7.11

最近在装了64位Win10系统的mac book笔记本上用mysql-installer-community-5.7.11.0安装Mysql5.7.11,在配置mysql server时老是卡住,报错。(在别的PC相同windows系统,自动安装没问题),估计是硬盘空间不够,有些临时文件无法保存的原因。于是手动安装,这样产生的临时文件不多,最后成功安装,步骤如下:

一.准备安装软件

1.mysql.com下载mysql-5.7.11-win32.zip

2.mysql-workbench-community-6.3.6-win32.msi

3.vcredist_x64 (第2步需要安装MicroSoft Visual C++ 2013 Redistributable Package)

二.安装Mysql

1.解压mysql-5.7.11-win32.zip 到 c:\mysql-5.7.11-win32

2.设置环境变量 MYSQL_HOME=c:\mysql-5.7.11-win32, path=%MYSQL_HOME%\bin

3.关键一步是my.ini的设置,我的是

1 [WinMySQLAdmin]2 Server="C:/mysql-5.7.11-win32/bin/mysqld.exe"

4 [client]5 no-beep

7 # pipe8 # socket=mysql9 port=3306

11 [mysql]12

13 default-character-set=utf814

15 # For advice on how to change settings please see16 # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

17 # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

18 # *** default location during install, and will be replaced ifyou19 # ***upgrade to a newer version of MySQL.

21 [mysqld]

23 explicit_defaults_for_timestamp =TRUE24

25 # Remove leading # and set to the amount of RAM forthe most important data26 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.27 innodb_buffer_pool_size =2G28

29 # Remove leading # to turn on a very important data integrity option: logging30 # changes to the binary log between backups.31 # log_bin32

33 # These are commonly set, remove the # and set asrequired.34

35 basedir="C:\mysql-5.7.11-win32\"

36 datadir="C:\mysql-5.7.11-win32\data\"

37

38 port=3306

39 server_id=1

40

41 general-log=0

42 general_log_file="mysql_general.log"

43 slow-query-log=1

44 slow_query_log_file="mysql_slow_query.log"

45 long_query_time=10

47 log-error="mysql_error_log.err"

50 default-storage-engine=INNODB51 max_connections=1024

52 query_cache_size=128M53 key_buffer_size=128M54 innodb_flush_log_at_trx_commit=1

55 innodb_thread_concurrency=128

56 innodb_autoextend_increment=128M57 tmp_table_size=128M58

59 # Remove leading # to set options mainly useful forreporting servers.60 # The server defaults are faster fortransactions and fast SELECTs.61 # Adjust sizes asneeded, experiment to find the optimal values.62 # join_buffer_size =128M63 # sort_buffer_size =2M64 # read_rnd_buffer_size =2M65

66 #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES67 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

68 character-set-server=utf869 innodb_flush_method=normal

4. 管理员身份进入cmd(以下都是)

5.mysqld --install MySQL --defaults-file=C:\mysql-5.7.11-win32\my.ini 安装mysql服务

6.mysqld --initialize 这是生成data目录及初始化数据

7.在data目录mysql_error_log文件,找[Note] A temporary password is generated for root@localhost: 5ZC=7Qe&eneg,“:”后面红色标识的三位便是初始密码,或者:后面全部字符

8.启动服务net start mysql 或在服务中启动

服务默认启动程序mysqld在C:\Program Files\MySQL\Mysql Server 5.7(如运行过自动安装程序会有),如果没有将mysqld拷到这里

9.mysqld

10.新开cmd, mysql -uroot -p

输入初始密码连接进入mysql数据库后,修改密码如下:

set password=password('123456');

flush privileges;

退出再次登录,使用新密码就行了:

mysql -uroot -p123456

三、为方便操作安装workbench

1.先安装Visual C++2013 Redistributable Package

2.安装workbench 32位

这两步没什么困难。

好了,Mysql 5.7.11 32位在win10 64位系统安装成功。

最后提醒下,ODBC连接要装32位的,使用C:\Windows\SysWOW64\odbcad32.exe配置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值