Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cd /usr/local/mysql/bin
- $ ./mysqladmin -u root password 'password'
- Welcome to the MySQL monitor. Commands end with ; or g.
- Your MySQL connection id is 224
- Server version: 5.5.13 MySQL Community Server (GPL)
- Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
- mysql>
- $ mysql -u root
- mysql> USE mysql;
- mysql> UPDATE user SET password=PASSWORD("NEWPASSWORD") WHERE User='root';
- mysql> FLUSH PRIVILEGES;
- mysql> quit
- mysql> UPDATE user SET authentication_string=PASSWORD("NEWPASSWORD") WHERE User='root';
- /usr/local/mysql/bin/mysqladmin -u root password NEW_PASSWORD_HERE
- cd /usr/local/mysql/bin/
- ./mysql -u root -p
- > Enter password: [type old password invisibly]
- use mysql;
- update user set password=PASSWORD("NEW_PASSWORD_HERE") where User='root';
- flush privileges;
- quit
- 1. sudo /usr/local/mysql/support-files/mysql.server stop
- 2) sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables
- 3) /usr/local/mysql/support-files/mysql
- 4) mysql> FLUSH PRIVILEGES;
- 5) mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
- 6) Ctrl + z
- 7) sudo /usr/local/mysql/support-files/mysql.server start
- 8) /usr/local/mysql/support-files/mysql -u root -p
- 9) enter the new password i.e MyNewPass
- sudo /usr/local/mysql/support-files/mysql.server stop
- sudo mysqld_safe --skip-grant-tables
- mysql -u root
- UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
- FLUSH PRIVILEGES;
- q
- sudo /usr/local/mysql/support-files/mysql.server start
- sudo su
- sudo /usr/local/mysql/support-files/mysql.server stop
- mysql -u root
- UPDATE mysql.user SET authentication_string=PASSWORD('new_password') WHERE User='root';
- FLUSH PRIVILEGES;
Add Comment
Please, Sign In to add comment