472,358 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,358 software developers and data experts.

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 2755
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: KnockKnock | last post by:
Hi all, I have run into a bit of a problem. I recently setup mysql to run on a Debian Linux box I setup. I am by no means an expert on either linux or mysql. I know enough to just be dangerous....
0
by: Ola Ogunneye | last post by:
--=_7B255FAE.1F7E0C30 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello all, Let me start out by saying that I am still a newbie. I just freshly installed...
0
by: Ryan Schefke | last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ..I just sent this out to the win32 distribution list but no one has...
0
by: SteveWa | last post by:
I have installed MySQL 4.0.15-0 from a RPM at the MySQL.com website using the command line syntax: root# cd /tmp/downloads root# rpm -i MySQL-server-4.0.15-0.i386.rpm after I install that...
9
by: ruud | last post by:
I just installed MySQL server 3.23.58-1. Now I can't find the password en can's change the settings. Who knows this password?
0
by: os2 | last post by:
hi i have installed mysql via yast under suse 9 linux:/home/mcollin # rcmysql start Starting service MySQL done i try to change the password...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.