469,267 Members | 1,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

Restart mySQL service after root password change

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.
Jul 19 '05 #1
12 2618
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

Jul 19 '05 #2
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

Jul 19 '05 #3
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

Jul 19 '05 #4
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...

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

Jul 19 '05 #5
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...

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

Jul 19 '05 #6
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...

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

Jul 19 '05 #7
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html
Jul 19 '05 #8
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html
Jul 19 '05 #9
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html
Jul 19 '05 #10
Hehe - I do have this manual on my computer but only used it as a reference,
obviously a mistake - considering that it says it right here:

If you modify the grant tables manually (using INSERT, UPDATE, etc.), you
should execute a FLUSH PRIVILEGES statement or run mysqladmin
flush-privileges or mysqladmin reload to tell the server to reload the grant
tables. Otherwise, your changes will have no effect until you restart the
server. If you change the grant tables manually but forget to reload the
privileges, you will be wondering why your changes don't seem to make any
difference!

Thanks!

"Aggro" <sp**********@yahoo.com> wrote in message
news:ok****************@read3.inet.fi...
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html

Jul 19 '05 #11
Hehe - I do have this manual on my computer but only used it as a reference,
obviously a mistake - considering that it says it right here:

If you modify the grant tables manually (using INSERT, UPDATE, etc.), you
should execute a FLUSH PRIVILEGES statement or run mysqladmin
flush-privileges or mysqladmin reload to tell the server to reload the grant
tables. Otherwise, your changes will have no effect until you restart the
server. If you change the grant tables manually but forget to reload the
privileges, you will be wondering why your changes don't seem to make any
difference!

Thanks!

"Aggro" <sp**********@yahoo.com> wrote in message
news:ok****************@read3.inet.fi...
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html

Jul 19 '05 #12
Hehe - I do have this manual on my computer but only used it as a reference,
obviously a mistake - considering that it says it right here:

If you modify the grant tables manually (using INSERT, UPDATE, etc.), you
should execute a FLUSH PRIVILEGES statement or run mysqladmin
flush-privileges or mysqladmin reload to tell the server to reload the grant
tables. Otherwise, your changes will have no effect until you restart the
server. If you change the grant tables manually but forget to reload the
privileges, you will be wondering why your changes don't seem to make any
difference!

Thanks!

"Aggro" <sp**********@yahoo.com> wrote in message
news:ok****************@read3.inet.fi...
Florian wrote:
Thanks, that worked just fine. I got this fancy book but that author
certainly didn't mention that one...


Try using the MySQL manual with your book and you get better results:

http://www.mysql.com/doc/en/index.html

Jul 19 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by KnockKnock | last post: by
reply views Thread by Ola Ogunneye | last post: by
reply views Thread by Ryan Schefke | last post: by
9 posts views Thread by ruud | last post: by
reply views Thread by os2 | last post: by
Atli
6 posts views Thread by Atli | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.