Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Stop MySQL service
- - You can do that using the preference pane if you have that installed "Preferences" > "MySQL" (at the bottom)
- - You can stop it using Terminal `sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop`
- ### Skipping Access Tables
- - If you have installed MySQL5, fire up Terminal window and execute `/usr/local/mysql/bin/mysqld_safe --skip-grant-tables`
- - For older versions of MySQL, execute the following command `/usr/local/mysql/bin/safe_mysqld --skip-grant-tables`
- ### Reset MySQL root password
- Now when safe_mysqld running in one Terminal window
- open up another Terminal window and execute `/usr/local/mysql/bin/mysql mysql`
- This opening up the MySQL console and opening the mysql table so we can update MySQL root user.
- Write the reset query into the console as follows
- ```
- UPDATE user SET Password=PASSWORD(‘YOUR_PASSWORD’) WHERE Host=’localhost’ AND User=’root’;
- ```
- Replace “YOUR_PASSWORD” with your desired password.
- Once you’ve done that just exit the console `exit;` close the safe_mysqld execution and restart your MySQL server.
- You can do this using `sudo /Library/StartupItems/MySQLCOM/MySQLCOM start`
- Once you have done that you can access mysql again with no issues
Add Comment
Please, Sign In to add comment