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 # pipe  
 8 # socket=mysql  
 9 port=3306   
11 [mysql]  
12   
13 default-character-set=utf8  
14  
15 # For advice on how to change settings please see  
16 # 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 if you  
19 # *** upgrade to a newer version of MySQL.    
21 [mysqld]  
23 explicit_defaults_for_timestamp = TRUE  
24 
25 # Remove leading # and set to the amount of RAM for the most important data  
26 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.  
27 innodb_buffer_pool_size = 2G  
28   
29 # Remove leading # to turn on a very important data integrity option: logging  
30 # changes to the binary log between backups.  
31 # log_bin  
32   
33 # These are commonly set, remove the # and set as required.  
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=INNODB  
51 max_connections=1024  
52 query_cache_size=128M  
53 key_buffer_size=128M  
54 innodb_flush_log_at_trx_commit=1  
55 innodb_thread_concurrency=128  
56 innodb_autoextend_increment=128M  
57 tmp_table_size=128M  
58   
59 # Remove leading # to set options mainly useful for reporting servers.  
60 # The server defaults are faster for transactions and fast SELECTs.  
61 # Adjust sizes as needed, experiment to find the optimal values.  
62 # join_buffer_size = 128M  
63 # sort_buffer_size = 2M  
64 # read_rnd_buffer_size = 2M   
65   
66 #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES   
67 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"  
68 character-set-server=utf8  
69 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配置

   

 

转载于:https://www.cnblogs.com/realhope/p/5300754.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值