mysqladministrator 启动出错

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script> <script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

 

<script type="text/javascript"> </script> <script class="blogstory"> </script>

Mysql community edition 5.1.37
Mysql administrator 1.2.17


Mysql是利用解压的方式安装在Windows操作系统上的。所以首先在 C:/WINDOWS下面增加了my.ini(你可以在mysql安装目录下找到类似的my-small.ini, my-medium.ini等文件,随便拷贝一个修改名字为my.ini就好了,在my.ini [client]节下面的user、password表示当你用mysql程序如mysql.exe连接时采用的默认用户名和密码,通常会用mysql -u root -p之类的命令,如果在client节下设置了user和password值的话,直接用mysql命令就可以连接上数据库)。

利用"mysqld --install"命令可以将mysqld添加到Service当中去,这样可以通过服务进行启动。但是这样启动之后,你会发现启动mysqladministrator会出现如下错误提示(连接设置为host=localhost, port=3306, user=root, password是空,mysql默认的设置是这样的):


"Either the server service or the configuration file could not be found. Startup variables and service section are therefore disabled ."


点击"OK" 发现Mysql administrator 好像工作正常,但是 "Service Control" 页面是灰的而且有一行红色的提示 "This section is only available when connected to localhost ".

 

问题是mysqladministrator找不到my.ini,解决方法就是在mysqld启动的时候增加"--defaults-file"这个参数并指向my.ini.具体做法是:

首先停止msqld服务,然后利用mysqld --remove移除mysql服务,然后重新注册服务,命令行为mysqld --install MySQL --defaults-file=C:/Windows/my.ini

。其中MySQL表示服务的名字。

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值