Changing Mysql Password

2 views
Skip to first unread message

vrathore

unread,
Jun 7, 2008, 1:45:24 AM6/7/08
to Delhi Flex User Group
Last day i lost my mysql password , so i had to uninstall the whole
database server and reinstall, then going mysql site i found a way to
change my pass word , hope this may help u

Let’s look at all the ways to change MySQL password, for root and
other users:

In MySQL the default password is empty. This is inherently unsafe and
should be immediately changed. Here is how you can change MySQL
default root password:

mysqladmin -u root password NEWPASSWORD

Here is how you can change OLDPASSWORD to NEWPASSWORD

mysqladmin -u LOGIN -p OLDPASSWORD NEWPASSWORD

Replace LOGIN with your login name, OLDPASSWORD with your current
password and NEWPASSWORD with the new password.

Cheers

Varun Rathore

vrathore

unread,
Jun 7, 2008, 2:07:50 AM6/7/08
to Delhi Flex User Group
Here is a simple command to auto repair, check and optimize all the
tables in all databases running on a MySQL server:

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

mysqlcheck is available in MySQL 3.23.38 and later.
Reply all
Reply to author
Forward
0 new messages