Advertisement
Guest User

Untitled

a guest
Oct 8th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // Stop and start the MySQL service
  2. // (Ubuntu and Debian) Run the following command:
  3. sudo /etc/init.d/mysql stop
  4.  
  5. // (CentOS, Fedora, and Red Hat Enterprise Linux) Run the following command:
  6. sudo /etc/init.d/mysqld stop
  7.  
  8. // Start MySQL without a password
  9. sudo mysqld_safe --skip-grant-tables &
  10.  
  11. // Connect to MySQL
  12. mysql -uroot
  13.  
  14. // Set a new MySQL root password
  15. use mysql;
  16. update user set password=PASSWORD("MT&E&11L7g2=") where User='root';
  17. flush privileges;
  18. quit
  19.  
  20. // Stop and start the MySQL service
  21. // (Ubuntu and Debian) Run the following commands:
  22. sudo /etc/init.d/mysql stop
  23.  
  24. // (CentOS, Fedora, and Red Hat Enterprise Linux) Run the following commands:
  25. sudo /etc/init.d/mysqld stop
  26. sudo /etc/init.d/mysqld start
  27.  
  28. // Log in to the database
  29. mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement