Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
- $mysqld_safe --skip-grant-tables
- $ mysql -u root mysql
- $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
- $mysql> FLUSH PRIVILEGES;
- #If you face the unknown field Password error above use:
- #update user set authentication_string=password('my_password') where user='root';
- #Finally, restart the instance/daemon without the --skip-grant-tables option.
- $ /etc/init.d/mysql restart
- #You should now be able to connect with your new password.
- $ mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement