MySQL Administration
MySql root password reset on Debian/Ubuntu
To connect to MySQL as the root user do the following:$ sudo mysql --defaults-extra-file=/etc/mysql/debian.cnf
MySql root password reset on CentOS/Oracle Unbreakable/Red Hat
Stop MySql# service mysqld stop
Start MySql without security
# /usr/bin/safe_mysqld --skip-grant-tables &
Change / Reset MySql root password
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root'
mysql> FLUSH PRIVILEGES;
mysql> exit;Stop MySql
# mysqladmin shutdown
Start MySql normally
# service mysqld start
REFERRERS
MySqlAdministration
MySqlDesignQuery