Method 1(install mysql):
/usr/local/mysql/bin/:
./mysqladmin -u root password 'new_password'

Method 2
mysql>UPDATE user SET password=PASSWORD('new_password') WHERE user='root';
mysql>FLUSH PRIVILEGES;

Method 3:
mysql>SET 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座中金在线大厦

Reply via email to