i havent got a mail sender (sendmail) setup on the system yet
and well
i cant remember the password to login
the computer went funny and after i did my first initial log on, i lost the autogen password it gave me
how do i reset it all??
help please!

i want to reset the first initial user/password stuff and do it again

Comments

golgo13’s picture

What exactly are you trying to do? Reset the root password or the mysql data base user password?

If it's the mysql password you want to reset then you need to edit
1. "/etc/mysql/my.cnf" add the line

skip-grant-tables

anywhere under the [mysqld] entry.

2. Set a new password with the mysqladmin password command:
shell> mysqladmin -u root password 'mynewpassword'

3. Now you can either stop mysqld and restart it normally, or just load the privilege tables with:
shell> mysqladmin -h hostname flush-privileges

4. After this, you should be able to connect using the new password.

Alternatively, you can set the new password using the mysql client:

1. Take down and restart mysqld with the --skip-grant-tables option as described above.

2. Connect to the mysqld server with:
shell> mysql -u root mysql

3. Issue the following commands in the mysql client:
mysql> UPDATE user SET Password=PASSWORD('mynewpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES;

4. After this, you should be able to connect using the new password.

5. You can now stop mysqld and restart it normally.

Hope this helps.

www.phonemouth.com