很久没有安装mysql的新版本,这次安装遇到问题不少,查了不少资料。在这里总结一下,以免以后重复摔跤。
1、版本的选择
注意Oracle需要登录,从版本的名称可以看出具体的作用,标有下划线的是我下载的版本
Select | Name | Part Number | Size (Bytes) |
---|---|---|---|
Download | MySQL Installer 5.6.19.0 Package | V45461-01 | 510M |
Download | MySQL Database 5.6.19 ZIP for Windows x86 (64bit) | V45475-01 | 243M |
Download | MySQL Cluster 7.3.5 ZIP for Windows x86 (64bit) | V45044-01 | 359M |
Download | MySQL Cluster 7.3.5 MSI for Windows x86 (64bit) | V45043-01 | 104M |
Download | MySQL Cluster Manager 1.3.1+Cluster MSI for Windows x86 (64bit) | V44986-01 | 375M |
Download | MySQL Workbench 6.1.7 ZIP for Windows x86 (32bit, no installer) | V45911-01 | 47M |
Download | MySQL Workbench 6.1.7 MSI for Windows x86 (32bit) | V45910-01 | 42M |
Download | MySQL Utilities 1.4.3 ZIP for portable Python 2.7 binaries | V45392-01 | 960K |
Download | MySQL Utilities 1.4.3 ZIP for portable Python 2.6 binaries | V45390-01 | 962K |
Download | MySQL Utilities 1.4.3 MSI for portable Python 2.6 binaries | V45398-01 | 8.2M |
Download | MySQL Enterprise Monitor Documentation 3.0.12 (English) | V45956-01 |
2、这个版本是绿色版本的,注册和启动过程
安装mysql服务
%mysql_path%\bin> mysqld --install mysql --default-file="%mysql_path%\my-defaults.ini"
启动mysql
net start mysql
|
可以配置自己的ini文件:my.ini
[client]
default-character-set=utf8
[mysqld]
# 设置mysql服务器编码 # The TCP/IP Port the MySQL Server will listen on port=3306 character_set_server=utf8 #basedir设置mysql的安装目录,如果目录中带空格则必须加引号 #datadir设置mysql数据库的数据的存放目录,文件夹名必须是data basedir=D:\mysql\win32\mysql-advanced-5.6.16-win32 datadir=D:\mysql\win32\mysql-advanced-5.6.16-win32\data |
3、问题总结
A、1067进程意外中止
首先查看 %mysql_path%\data\xx.err文件
2014-08-02 12:52:21 6988 [ERROR] Can't start server: Bind on TCP/IP port: No such file or directory 2014-08-02 12:52:21 6988 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2014-08-02 12:52:21 6988 [ERROR] Aborting |
从日志看出为端口占用,3306被谁占用了呢?
netstat -ano | findstr "3306"
tasklist|findstr "2736"
可以看到占用3306是mysqld,证明mysql服务已经启动。
其他报错原因请参考:
B、删除windows服务
cmd--> sc delete mysql
________________________________________