root密码更改后重新启动mySQL服务 [英] Restart mySQL service after root password change

查看:119
本文介绍了root密码更改后重新启动mySQL服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为此而磕磕绊绊,我认为这很奇怪,行为。我在Win2k机器上安装了mySQL,并尝试更改root密码,

这似乎无法正常工作。


我改变了这种方式:


c:> mysql

mysql>使用mysql

mysql>更新用户设置密码= PASSWORD(''test'')其中user =''root'';

mysql>退出


然后尝试以这种方式登录:


c:> mysql -u root -p

密码:测试


这是行不通的。然后,经过多次不成功的尝试,我重新启动了

服务,突然我设置的密码有效。然后我意识到(至少对于root密码来说是
)我需要每次都重新启动mySQL服务

我更改了root密码,否则它就不会生效。


这是设计的???我做错了什么?


这不是一个类似COMMIT的问题,是吗?

谢谢。

I''ve been stumbling over this, what I consider strange, behaviour. I
installed mySQL on a Win2k machine and tried to change the root password,
which didn''t seem to work.

I changed it this way:

c:>mysql
mysql> use mysql
mysql> update user set password=PASSWORD(''test'') where user=''root'';
mysql> exit

and then tried to login this way:

c:>mysql -u root -p
password: test

which didn''t work. Then, after many unsuccessful attempts, I restarted the
service and suddenly the password I had set worked. Then I realized that (at
least for the root password) I needed to restart the mySQL service everytime
I changed the root password, otherwise it would not become effective.

Is this by design??? Am I doing something wrong?

This is not a COMMIT like issue, is it?
Thanks.

推荐答案

Florian写道:
Florian wrote:
我一直在为此而磕磕绊绊,我认为这很奇怪,行为。我在Win2k机器上安装了mySQL并尝试更改root密码,
这似乎无法正常工作。

我改变了这种方式:

c:> mysql
mysql>使用mysql
mysql>更新用户设置密码= PASSWORD(''test'')其中user =''root'';
mysql>退出

然后尝试以这种方式登录:

c:> mysql -u root -p
密码:test

哪个都行不通。然后,在多次尝试失败之后,我重新启动了
服务,突然我设置的密码正常工作。然后我意识到(至少对于root密码)我需要每次都重新启动mySQL服务
我更改了root密码,否则它就不会生效。

是这个设计???我做错了什么?

这不是一个类似COMMIT的问题,是吗?

谢谢。
I''ve been stumbling over this, what I consider strange, behaviour. I
installed mySQL on a Win2k machine and tried to change the root password,
which didn''t seem to work.

I changed it this way:

c:>mysql
mysql> use mysql
mysql> update user set password=PASSWORD(''test'') where user=''root'';
mysql> exit

and then tried to login this way:

c:>mysql -u root -p
password: test

which didn''t work. Then, after many unsuccessful attempts, I restarted the
service and suddenly the password I had set worked. Then I realized that (at
least for the root password) I needed to restart the mySQL service everytime
I changed the root password, otherwise it would not become effective.

Is this by design??? Am I doing something wrong?

This is not a COMMIT like issue, is it?
Thanks.



尝试命令FLUSH PRIVILEGES;更改密码后。

干杯


Try the command FLUSH PRIVILEGES; after changing the password.
Cheers


Florian写道:
Florian wrote:
我'我一直在磕磕绊绊,我认为这很奇怪,行为。我在Win2k机器上安装了mySQL并尝试更改root密码,
这似乎无法正常工作。

我改变了这种方式:

c:> mysql
mysql>使用mysql
mysql>更新用户设置密码= PASSWORD(''test'')其中user =''root'';
mysql>退出

然后尝试以这种方式登录:

c:> mysql -u root -p
密码:test

哪个都行不通。然后,在多次尝试失败之后,我重新启动了
服务,突然我设置的密码正常工作。然后我意识到(至少对于root密码)我需要每次都重新启动mySQL服务
我更改了root密码,否则它就不会生效。

是这个设计???我做错了什么?

这不是一个类似COMMIT的问题,是吗?

谢谢。
I''ve been stumbling over this, what I consider strange, behaviour. I
installed mySQL on a Win2k machine and tried to change the root password,
which didn''t seem to work.

I changed it this way:

c:>mysql
mysql> use mysql
mysql> update user set password=PASSWORD(''test'') where user=''root'';
mysql> exit

and then tried to login this way:

c:>mysql -u root -p
password: test

which didn''t work. Then, after many unsuccessful attempts, I restarted the
service and suddenly the password I had set worked. Then I realized that (at
least for the root password) I needed to restart the mySQL service everytime
I changed the root password, otherwise it would not become effective.

Is this by design??? Am I doing something wrong?

This is not a COMMIT like issue, is it?
Thanks.



尝试命令FLUSH PRIVILEGES;更改密码后。

干杯


Try the command FLUSH PRIVILEGES; after changing the password.
Cheers


Florian写道:
Florian wrote:
我'我一直在磕磕绊绊,我认为这很奇怪,行为。我在Win2k机器上安装了mySQL并尝试更改root密码,
这似乎无法正常工作。

我改变了这种方式:

c:> mysql
mysql>使用mysql
mysql>更新用户设置密码= PASSWORD(''test'')其中user =''root'';
mysql>退出

然后尝试以这种方式登录:

c:> mysql -u root -p
密码:test

哪个都行不通。然后,在多次尝试失败之后,我重新启动了
服务,突然我设置的密码正常工作。然后我意识到(至少对于root密码)我需要每次都重新启动mySQL服务
我更改了root密码,否则它就不会生效。

是这个设计???我做错了什么?

这不是一个类似COMMIT的问题,是吗?

谢谢。
I''ve been stumbling over this, what I consider strange, behaviour. I
installed mySQL on a Win2k machine and tried to change the root password,
which didn''t seem to work.

I changed it this way:

c:>mysql
mysql> use mysql
mysql> update user set password=PASSWORD(''test'') where user=''root'';
mysql> exit

and then tried to login this way:

c:>mysql -u root -p
password: test

which didn''t work. Then, after many unsuccessful attempts, I restarted the
service and suddenly the password I had set worked. Then I realized that (at
least for the root password) I needed to restart the mySQL service everytime
I changed the root password, otherwise it would not become effective.

Is this by design??? Am I doing something wrong?

This is not a COMMIT like issue, is it?
Thanks.



尝试命令FLUSH PRIVILEGES;更改密码后。

干杯


Try the command FLUSH PRIVILEGES; after changing the password.
Cheers


这篇关于root密码更改后重新启动mySQL服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆