Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Linux Users:
- Log on to your Linux machine as the root user. The steps involved in resetting the MySQL root password are to stop the MySQL server, restart it without the permissions active so you can log into MySQL as root without a password, set a new password, and then restart it normally. Here’s how you do it. First, stop the MySQL server:
- # /etc/init.d/mysql stop
- Now start the MySQL server using the --skip-grant-tables option, which will run the server without loading the permissions settings:
- # mysqld_safe --skip-grant-tables &
- The & option at the end makes the command you have executed run as a background process. Now log on to your MySQL server as root:
- # mysql -u root
- It should allow you in without prompting for a password. The following steps will set the new password:
- mysql> use mysql;
- mysql> update user set password=PASSWORD(”NewMySQLPassword”) where User=’root’;
- mysql> flush privileges;
- mysql> quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement