一、卸载及安装
MySQL安装到最后一步就卡住,如图:

卸载原来安装的MySQL1、首先,卸载MySQL;2、然后,删除C盘下(C:\ProgramData\MySQL)文件;
然后重新安装MySQL,但是,这里要注意了,安装图1中时不要勾上(Launch the Mysql instance configuration wizard 不要勾上),直接单击“Finish”按钮。

安装完毕后,我们打开MySQL安装路径,这里我安装在D:\Program Files\MySQL。然后找到bin 下面的MysqlinstanceConfig.exe

设置属性如下图:

然后,双击打开MySQLInstanceConfig.exe 进入其 Mysql实例配置。
二、配置
1、安装完成了,出现如下界面将进入mysql配置向导。


2、选择配置方式,“Detailed Configuration(手动精确配置)”、“Standard Configuration(标准配置)”,我们选择“Detailed Configuration”,方便熟悉配置过程。

3、选择服务器类型,“Developer Machine(开发测试类,mysql占用很少资源)”、“Server Machine(服务器类型,mysql占用较多资源)”、“Dedicated MySQL Server Machine(专门的数据库服务器,mysql占用所有可用资源)”

4、选择mysql数据库的大致用途,“Multifunctional Database(通用多功能型,好)”、“Transactional Database Only(服务器类型,专注于事务处理,一般)”、“Non-Transactional Database Only(非事务处理型,较简单,主要做一些监控、记数用,对MyISAM数据类型的支持仅限于non-transactional),按“Next”继续。

5、选择网站并发连接数,同时连接的数目,“Decision Support(DSS)/OLAP(20个左右)”、“Online Transaction Processing(OLTP)(500个左右)”、“Manual Setting(手动设置,自己输一个数)”。


6、是否启用TCP/IP连接,设定端口,如果不启用,就只能在自己的机器上访问mysql数据库了,在这个页面上,您还可以选择“启用标准模式”(Enable Strict Mode),这样MySQL就不会允许细小的语法错误。如果是新手,建议您取消标准模式以减少麻烦。但熟悉MySQL以后,尽量使用标准模式,因为它可以降低有害数据进入数据库的可能性。按“Next”继续

7、就是对mysql默认数据库语言编码进行设置(重要),一般选UTF-8,按 “Next”继续。

8、选择是否将mysql安装为windows服务,还可以指定Service Name(服务标识名称),是否将mysql的bin目录加入到Windows PATH(加入后,就可以直接使用bin下的文件,而不用指出目录名,比如连接,“mysql.exe -uusername -ppassword;”就可以了,不用指出mysql.exe的完整地址,很方便),我这里全部打上了勾,Service Name不变。按“Next”继续。

9、询问是否要修改默认root用户(超级管理)的密码。“Enable root access from remote machines(是否允许root用户在其它的机器上登陆,如果要安全,就不要勾上,如果要方便,就勾上它)”。最后“Create An Anonymous Account(新建一个匿名用户,匿名用户可以连接数据库,不能操作数据,包括查询)”,一般就不用勾了,设置完毕,按“Next”继续。

10、确认设置无误,按“Execute”使设置生效,即完成MYSQL的安装和配置。


|