How to change root password?
How to change root password?
am 16.11.2009 05:13:38 von Michael Wilson
I am running MySQL 5 on OS X Snow Leopard...
Have it set up (by installing the pref pane) to always be running as =
soon as my MacBook starts.
For some odd reason, I can't remember the password I issued for "root" =
user and wish to either change it back to blank or a new specific =
password.
What should I type from the command line?
When I tried:
mysqladmin -uroot -p
The Bash shell listed out all the possible arguments which the =
mysqladmin could utilize:
mysqladmin Ver 8.42 Distrib 5.4.3-beta, for apple-darwin9.5.0 on i386
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
-c, --count=3D# Number of iterations to make. This works with -i
(--sleep) only.
--debug-check Check memory and open file usage at exit .
// etc
Would appreciate if someone could help...
-Michael=
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: How to change root password?
am 16.11.2009 07:45:42 von tibyke
Michael Wilson írta:
> I am running MySQL 5 on OS X Snow Leopard...
>
> Have it set up (by installing the pref pane) to always be running as soon as my MacBook starts.
>
> For some odd reason, I can't remember the password I issued for "root" user and wish to either change it back to blank or a new specific password.
>
> What should I type from the command line?
>
> When I tried:
http://lmgtfy.com/?q=mysql+reset+root+password
t
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: How to change root password?
am 16.11.2009 08:37:49 von Alexey Mykhailov
On Sun, 15 Nov 2009 20:13:38 -0800, Michael Wilson
wrote:
> I am running MySQL 5 on OS X Snow Leopard...
>
> Have it set up (by installing the pref pane) to always be running as
soon
> as my MacBook starts.
>
> For some odd reason, I can't remember the password I issued for "root"
> user and wish to either change it back to blank or a new specific
password.
>
> What should I type from the command line?
>
> When I tried:
>
> mysqladmin -uroot -p
>
> The Bash shell listed out all the possible arguments which the
mysqladmin
> could utilize:
>
> mysqladmin Ver 8.42 Distrib 5.4.3-beta, for apple-darwin9.5.0 on i386
> Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to modify and redistribute it under the GPL license
>
> Administration program for the mysqld daemon.
> Usage: mysqladmin [OPTIONS] command command....
> -c, --count=# Number of iterations to make. This works with -i
> (--sleep) only.
> --debug-check Check memory and open file usage at exit .
> // etc
>
> Would appreciate if someone could help...
>
> -Michael
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions .html
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: How to change root password?
am 17.11.2009 01:56:07 von Michael Wilson
None, of these suggestions worked...
Tried the following ways to reset the password:
(1) Shut down MySQL via System Preferences pane
(2) Placed the following in a text file:
UPDATE mysql.user SET Password=3DPASSWORD('') WHERE User=3D'root';
FLUSH PRIVILEGES;
(3 Invoked the following command from the command line in Bash:
mysqld_safe --init-file=3D/Users/raven/mysql-init &
[1] 2236
Received these errors:
mysqld_safe Logging to '/usr/local/mysql/data/Valkyrie.local.err'.
touch: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
chown: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
mysqld_safe Starting mysqld daemon with databases from =
/usr/local/mysql/data
/usr/local/mysql/bin/mysqld_safe: line 105: =
/usr/local/mysql/data/Valkyrie.local.err: Permission denied
rm: /usr/local/mysql/data/Valkyrie.local.pid: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 142: =
/usr/local/mysql/data/Valkyrie.local.err: Permission denied
mysqld_safe mysqld from pid file =
/usr/local/mysql/data/Valkyrie.local.pid ended
/usr/local/mysql/bin/mysqld_safe: line 105: =
/usr/local/mysql/data/Valkyrie.local.err: Permission denied
On Nov 15, 2009, at 11:37 PM, Alexey Mykhailov wrote:
> On Sun, 15 Nov 2009 20:13:38 -0800, Michael Wilson
> wrote:
>> I am running MySQL 5 on OS X Snow Leopard...
>>=20
>> Have it set up (by installing the pref pane) to always be running as
> soon
>> as my MacBook starts.
>>=20
>> For some odd reason, I can't remember the password I issued for =
"root"
>> user and wish to either change it back to blank or a new specific
> password.
>>=20
>> What should I type from the command line?
>>=20
>> When I tried:
>>=20
>> mysqladmin -uroot -p
>>=20
>> The Bash shell listed out all the possible arguments which the
> mysqladmin
>> could utilize:
>>=20
>> mysqladmin Ver 8.42 Distrib 5.4.3-beta, for apple-darwin9.5.0 on =
i386
>> Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
>> This software comes with ABSOLUTELY NO WARRANTY. This is free =
software,
>> and you are welcome to modify and redistribute it under the GPL =
license
>>=20
>> Administration program for the mysqld daemon.
>> Usage: mysqladmin [OPTIONS] command command....
>> -c, --count=3D# Number of iterations to make. This works with =
-i
>> (--sleep) only.
>> --debug-check Check memory and open file usage at exit .
>> // etc
>>=20
>> Would appreciate if someone could help...
>>=20
>> -Michael
>=20
> http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions .html
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: How to change root password?
am 17.11.2009 02:33:00 von John Daisley
Make sure your mysql server is not accessible to anyone else, its a good
idea to disconnect all network connections because the server will be
totally insecure for a short period of time!
Start your MySQL server with the --SKIP-GRANT-TABLES option.
At a shell prompt type
mysql -uroot
(you may have to add -h and -p options to the command above if you are
using a non-standard host or port). You should get a mysql prompt, at
the mysql prompt type
USE mysql;
Followed by
FLUSH PRIVILEGES;
Then type
UPDATE user set password = password('new_pass')
where user='root';
Replacing new_pass with your desired password.
Now type
FLUSH PRIVILEGES;
EXIT;
and restart the server without --SKIP-GRANT-TABLES
Regards
On Mon, 2009-11-16 at 16:56 -0800, Michael Wilson wrote:
> None, of these suggestions worked...
>
> Tried the following ways to reset the password:
>
> (1) Shut down MySQL via System Preferences pane
>
> (2) Placed the following in a text file:
>
> UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
> FLUSH PRIVILEGES;
>
> (3 Invoked the following command from the command line in Bash:
>
> mysqld_safe --init-file=/Users/raven/mysql-init &
> [1] 2236
>
> Received these errors:
>
> mysqld_safe Logging to '/usr/local/mysql/data/Valkyrie.local.err'.
> touch: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
> chown: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
> mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
> /usr/local/mysql/bin/mysqld_safe: line 105: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
> rm: /usr/local/mysql/data/Valkyrie.local.pid: Permission denied
> /usr/local/mysql/bin/mysqld_safe: line 142: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
> mysqld_safe mysqld from pid file /usr/local/mysql/data/Valkyrie.local.pid ended
> /usr/local/mysql/bin/mysqld_safe: line 105: /usr/local/mysql/data/Valkyrie.local.err: Permission denied
>
> On Nov 15, 2009, at 11:37 PM, Alexey Mykhailov wrote:
>
> > On Sun, 15 Nov 2009 20:13:38 -0800, Michael Wilson
> > wrote:
> >> I am running MySQL 5 on OS X Snow Leopard...
> >>
> >> Have it set up (by installing the pref pane) to always be running as
> > soon
> >> as my MacBook starts.
> >>
> >> For some odd reason, I can't remember the password I issued for "root"
> >> user and wish to either change it back to blank or a new specific
> > password.
> >>
> >> What should I type from the command line?
> >>
> >> When I tried:
> >>
> >> mysqladmin -uroot -p
> >>
> >> The Bash shell listed out all the possible arguments which the
> > mysqladmin
> >> could utilize:
> >>
> >> mysqladmin Ver 8.42 Distrib 5.4.3-beta, for apple-darwin9.5.0 on i386
> >> Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
> >> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> >> and you are welcome to modify and redistribute it under the GPL license
> >>
> >> Administration program for the mysqld daemon.
> >> Usage: mysqladmin [OPTIONS] command command....
> >> -c, --count=# Number of iterations to make. This works with -i
> >> (--sleep) only.
> >> --debug-check Check memory and open file usage at exit .
> >> // etc
> >>
> >> Would appreciate if someone could help...
> >>
> >> -Michael
> >
> > http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions .html
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: How to change root password?
am 17.11.2009 06:57:57 von Michael Wilson
Okay, that worked, thank you!
-Mike
On Nov 16, 2009, at 6:49 PM, Hassan Schroeder wrote:
> On Mon, Nov 16, 2009 at 6:15 PM, Michael Wilson
> wrote:
>
>> I don't know what the password is for the Unix mysql user...
>>
>> You mean sign in as mysql in the OS X Login Window?
>
> Just open a terminal window, type `sudo bash` and you'll be the root
> user. Then you can type `su - mysql` to become the mysql user. And
> of course, if mysql runs as a different user use that :-)
>
> Then you should be able to use that procedure, though frankly I've
> never seen it before; I've always used the --skip-grant-tables option.
>
> cheap 'n' cheerful, in the Canadian idiom :-)
>
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> twitter: @hassan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org