MySQL log in issues

2009-02-22 Thread Tim DeBoer
Hi everyone,
I'm having some problems getting logged in to mysql to create a new
database.
I have to admit, my overall skill level with mysql is 'Entry level noob'.
I just haven't ever had much need to mess with it in general, so if you want
to laugh, feel free. I'll understand  ;)

At any rate, as it has been about a year since the last time I tried to do
this, I've forgotten the root password and tried reset it using the
following steps:
1. Stopped the mysqld daemon process.
2. Started the mysqld daemon process with the --skip-grant-tables option.
3. Started the mysql client with the -u root option.
Once logged in as root, I did:

UPDATE mysql.user SET Password='newpass' WHERE User='root';
FLUSH PRIVILEGES;
exit

When I try to log in now:
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)

Can someone give me a nudge/push/drag me kicking and screaming in the right
direction?

Thanks everyone  :)

-- 
Tim DeBoer


Re: MySQL log in issues

2009-02-22 Thread Jim Lyons
You should have typed  ... set password = password('newpass')

You've set root's password to the encypted value of some other string.

You ought to be able to get around this by starting mysql (the server
process, not the client) using the --skip-grant-tables option and resetting
the password.

On Sun, Feb 22, 2009 at 9:38 PM, Tim DeBoer tdeb...@gmail.com wrote:

 Hi everyone,
 I'm having some problems getting logged in to mysql to create a new
 database.
 I have to admit, my overall skill level with mysql is 'Entry level noob'.
 I just haven't ever had much need to mess with it in general, so if you
 want
 to laugh, feel free. I'll understand  ;)

 At any rate, as it has been about a year since the last time I tried to do
 this, I've forgotten the root password and tried reset it using the
 following steps:
 1. Stopped the mysqld daemon process.
 2. Started the mysqld daemon process with the --skip-grant-tables option.
 3. Started the mysql client with the -u root option.
 Once logged in as root, I did:

 UPDATE mysql.user SET Password='newpass' WHERE User='root';
 FLUSH PRIVILEGES;
 exit

 When I try to log in now:
 # mysql -u root -p
 Enter password:
 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
 password: YES)

 Can someone give me a nudge/push/drag me kicking and screaming in the right
 direction?

 Thanks everyone  :)

 --
 Tim DeBoer




-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


Re: MySQL log in issues

2009-02-22 Thread 黄镜
Method 1(install mysql):
/usr/local/mysql/bin/:
./mysqladmin -u root password 'new_password'

Method 2
mysqlUPDATE user SET password=PASSWORD('new_password') WHERE user='root';
mysqlFLUSH PRIVILEGES;

Method 3:
mysqlSET PASSWORD FOR root=PASSWORD('new_password');

On Mon, Feb 23, 2009 at 11:38 AM, Tim DeBoer tdeb...@gmail.com wrote:

 Hi everyone,
 I'm having some problems getting logged in to mysql to create a new
 database.
 I have to admit, my overall skill level with mysql is 'Entry level noob'.
 I just haven't ever had much need to mess with it in general, so if you
 want
 to laugh, feel free. I'll understand  ;)

 At any rate, as it has been about a year since the last time I tried to do
 this, I've forgotten the root password and tried reset it using the
 following steps:
 1. Stopped the mysqld daemon process.
 2. Started the mysqld daemon process with the --skip-grant-tables option.
 3. Started the mysql client with the -u root option.
 Once logged in as root, I did:

 UPDATE mysql.user SET Password='newpass' WHERE User='root';
 FLUSH PRIVILEGES;
 exit

 When I try to log in now:
 # mysql -u root -p
 Enter password:
 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
 password: YES)

 Can someone give me a nudge/push/drag me kicking and screaming in the right
 direction?

 Thanks everyone  :)

 --
 Tim DeBoer




-- 
福建中金在线网络股份有限公司
中国人的财经门户网站
黄镜(John.huang)
http://www.cnfol.com
email:huangj...@cnfol.com
Tel:0591-87986223
Address:福建省福州市软件大道软件园A区25座中金在线大厦