Mysql安装注意事项

一、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.
表示防火墙安装失败。

查看安装日志能找到以下语句:
   mysql-installer Information: 10 : Attempting to create firewall rule with command: netsh.exe  firewall add portopening protocol=TCP port=3306 profile=ALL name=MySQL55 mode=ENABLE scope=ALL
   mysql-installer Information: 10 : Unexpected response from netsh: 确定。
    mysql-installer Information: 10 : Attempting to create firewall rule with command: netsh.exe  advfirewall firewall add rule name=”Port 3306” protocol=TCP localport=3306 dir=in action=allow
   mysql-installer Information: 10 : Unexpected response from netsh: 下列命令没有找到: advfirewall firewall add rule name=”Port 3306” protocol=TCP localport=3306 dir=in action=allow。

这种情况说明mysql的安装对中文系统支持得不好,不能识别 netsh.exe返回的“确定”信息,继而运行能在其他windows平台上运行的netsh.exe advfirewall命令(该命令xp不支持,所以报找不到该命令的错误。

解决办法有两个:  
①将自己的操作系统的语言设置为英文,然后重新安装mysql  。具体的可以进入控制面板->区域和语言  中去更改;另外,检查当前用户是否有启动防火墙的权限,在计算机服务中查看Application Layer Gateway Service的属性,查看登录选项卡中的用户是否是当前用户。
②检查防火墙端口,如果已经添加成功了,则不作处理,如果没有成功添加,则自己手动在防火墙中添加端口。

四、安装成功之后,只能通过mysql 5.5 command line client 连接localhost的mysql server,而不能通过workbench或其他客户端工具进行远程连接mysql server。

关键字:不能远程连接mysql server。可能原因:
①没有开端口,参见前一条解决。
②用户没有授权远程连接。
③mysql server不允许远程连接。

对于②用户没有授权远程连接,可以给用户授权,例如默认的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"),'','','')

对于③mysql server不允许远程连接的解决办法是,找到自己的my.ini,在[mysqld]下增加一行语句:
   bind-address=0.0.0.0
表示不绑定IP,重启你的Mysql服务。


五、配置文件my.ini的位置

MySQL配置向导将my.ini文件放置在MySQL服务器的安装目录中。这将有助于将配置文件和具体的服务器实例相 关联。为了保证MySQL服务器知道到哪里查找my.ini文件,和下面内容类似的参数将会被作为服务安装的一部分 传递给MySQL服务器:--defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini C:\Program Files\MySQL\MySQL Server 5.5可以被指向MySQL服务器的安装路径所代替。

编辑my.ini文:可以使用文本编辑器打开该文件同时做出必要的编辑和修改。你也可以以MySQL Administrator的应用程序来修 改服务器配置。 MySQL客户端和应用程序,例如mysql命令行客户端和mysqldump并不能确定位于服务器安装目录中的my.ini文件 的位置。为了配置客户端和应用程序,根据你的Windows版本的不同,在C:\Windows下或者在C:\WINNT目录下生 成新的文件my.ini 文件

如果你的MySQL配置向导发现了一个已经存在的my.ini文件,你可以重新配置已经存在的服务器,或者通过删除 my.ini文件、停止并移除MySQL服务的方法移除服务器实例。重新配置已经存在的服务器,选择“重新配置实例”选项并且选择“下一步”按钮。已经存在的my.ini文件被 重新命名为mytimestamp.ini.bak,时间戳是已经存在的my.ini创建时的日期和时间。移除已经存在的数据库实 例,选择“移除实例”选项并选择“下一步”按钮。如果选择了“移除实例”选项,进入到确认界面。单击“运行”按钮:MySQL配置向导停止并开始移除MySQL服 务,并删除my.ini文件。但服务器安装目录并没有移除。如果选择了“重新配置实例”选项,进入到“配置类型”界面,可以选择安装想要配置的安装类型。

 

YSQL安装出现could not start the service mysql error:0处理 当各位在安装、重装时出现could not start the service mysqlerror:0的错误时,可以尝试下面两种方法。 一、方式1 MySQL安装是出现could not start the service mysql error:0 提示错误,解决方法: 首 先,在管理工具->服务里面将MySQL的服务给停止,然后打开cmd 进入你的MySQL bin目录下,例如 C:\Program Files\MySQL\MySQL Server 5.0\bin 然后使用如下命令mysqld-nt -remove 然后就会显示......success!好了下面进入添加删除程序,找到MySQL选择卸载,记得选择remove。最后将MySQL目录删除,还有数据库的目录也删除。 一、方式2 查看服务中有没有mysql,如果有将该服务停掉; 安装mysql 5.1.33,在运行ServerInstance Configuration wizard时的Execute configurattion步骤中的第三项Start Service进出错,错误提示为Could not start the service MySQL (出现这种情况一般是因为装过mysql,卸载不干净造成的。卸载后重启后再重装。注意看下服务,如果未能卸载,可以用mysqld-nt -remove卸载)。 在控制面板中运行添加删除程序,将mysql卸载; 卸载后打开注册表,查看HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services下的键值,如果有相关mysql键值(mysql、mysqladmin)则删掉,即可; 重启,将mysql的安装残余目录删掉 (查看服务,此时服务中已没有mysql); 重新安装mysql.安装后先不要运行ServerInstance Configuration wizard,重启后在开始菜单中运行该向导,即可。 windowsxp系统 mysql-5.0.81 提示:1045 access denied for user 'root'@'localhost'using password yes MySQL 5.1 安装过程中报apply security setting错误的解决办法 收藏 Mysql安装错误apply security settings 解决方法 The securitysettings could not be applied to the database because the connection has failedwith the following error. Error Nr. 1045 Access denied foruser 'root'@'localhost'(using password: YES) If a personalfirewall is running on your machine, please make sure you have opened the TCPport 3306 for connections. Otherwise no client application can connect to theserver. After you have opened the port please press [Retry] to apply thesecurity settings.

thesecurity settings. If you arere-installing after you just uninstalled the MySQL server please note that thedata directory was not removed automatically. Therefore the old password fromyour last installation is still needed to connect to the server. In this caseplease select skip now and re-run the Configuration Wizard from the start menu. MySQL 5.1 安装过程中报apply security setting错误的解决办法 1, 卸载MySQL 2, 删除目录 C:\Documents and Settings\All Users\ApplicationData\MySQL 3, 重新安装MySQL 就 OK 啦 ------------------------------------------ [MySQL] Could notstart the service MySQL 解决方法

thesecurity settings. If you arere-installing after you just uninstalled the MySQL server please note that thedata directory was not removed automatically. Therefore the old password fromyour last installation is still needed to connect to the server. In this caseplease select skip now and re-run the Configuration Wizard from the start menu. MySQL 5.1 安装过程中报apply security setting错误的解决办法 1, 卸载MySQL 2, 删除目录 C:\Documents and Settings\All Users\ApplicationData\MySQL 3, 重新安装MySQL 就 OK 啦 ------------------------------------------ [MySQL] Could notstart the service MySQL 解决方法

3.如果在其他盘还有设置目录也要删除.空目录也要删除 4.到regedit把注册表 HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Applications/MySQL HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Applications/MySQL HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Applications/MySQL 有的话,全部删除! (技巧:用F3循环查找“mysql”) 5.如果任务管理器里有关mysql内容也删除 6,把防火墙关了 7,重新装mysql(这里我没有重启计算机) 重装时候有必要的话,重启计算机,停用IIS,和删除temp里的临时文件. 实在不行的话,配置mysql时候,把mysql服务换个服务名. ****************************************************************************************** --------------------------- 删除项时出错。 --------------------------- 无法删除 LEGACY_MYSQL51: 删除项时出错。

-------------------------- 确定 --------------------------- 解决办法:注册表项里右键增加administrators所有权限 安装mysql时可能产生cannot createwindows service for mysql.error:0错误,错误的原因多数由于重新安装mysql或者对mydql升级,使用MySQLConfiguration Wizard而产生. 解决的方法:到regedit把注册表,用F3循环查找“mysql”,全部删除,重新装mysql,即可。

posted @ 2013-04-27 15:15  刘尊礼  阅读(254)  评论(0)    收藏  举报