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 wrote:
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.
Try the command FLUSH PRIVILEGES; after changing the password.
Cheers
Florian wrote:
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.
Try the command FLUSH PRIVILEGES; after changing the password.
Cheers
Florian wrote:
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.
Try the command FLUSH PRIVILEGES; after changing the password.
Cheers