一、wizard安装最后一页,出现cannot create Windows service for mysql.error:0 错误
解决方法:打开命令行 输入 sc delete mysql 命令即
C:>sc delete mysql
[SC] DeleteService SUCCESS
重起电脑,或者卸载后重启再安装,这样就好了。我是卸载后重启的。
卸载重新安装要注意一个问题,在控制面板中卸载后,要去c:\Documents and Settings\All Users\Application Data目录下把Mysql文件夹删掉。里面可能记载了你卸载的配置信息,下次安装时会有影响。 二、在让输入管理员输入密码时除了password和confirm password之外还有一行current password。
这说明你安装之前没有把我第1条中说的目录下把Mysql文件夹删除。不知道是否影响后续使用,可能记得密码的话没关系。另附带一句,管理员密码是自己设的,用户名则为默认root。
安装成功后可测试如下:打开mysql command line client,输入密码,出现
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.33-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
则安装成功! 三、mysql server configuration失败。
在配置向导中查看错误提示有如下语句:
mysql-server-5.5-win32:60 - Adding firewall rule for MySQL55 on port 3306.
mysql-server-5.5-win32:66 - Adding firewall rule failed.
表示防火墙安装失败。
对于②用户没有授权远程连接,可以给用户授权,例如默认的root用户,可以在mysql 5.5 command line client 中输入如下命令:
//选择数据库
mysql>use mysql;
//给用户授权,yourpassword字段用你的密码代替
mysql>grant all priileges on *.* to identified by 'yourpassword';
//刷新系统权限表
mysql>flush privileges;
//查看是否授权成功
mysql> show grants for roots;
如果出现刚刚的授权,则表示成功。不成功的话,自己再添加一个新用户试试,添加用户的命令:
insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("%","newuser",password("newpassword"),'','','')