Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. sudo apt-get install mysql
  2.  
  3. service mysql start
  4.  
  5. ps aug | grep mysql
  6.  
  7. mysql 24618 6.5 1.6 1230276 133536 ? Ssl 19:03 0:00 /usr/sbin/mysqld
  8.  
  9. service mysql stop
  10.  
  11. sudo mysqld_safe --skip-grant-tables
  12.  
  13. mysql>
  14. mysql> UPDATE mysql.user SET authentication_string = ''
  15. -> WHERE User = 'root' AND Host = 'localhost';
  16. Query OK, 1 row affected (0.00 sec)
  17. Rows matched: 1 Changed: 1 Warnings: 0
  18.  
  19. mysql> FLUSH PRIVILEGES;
  20. Query OK, 0 rows affected (0.00 sec)
  21.  
  22. sudo kill -9 [pid_of_mysqld_safe]
  23.  
  24. service mysql start
  25.  
  26. mysql -u root
  27.  
  28. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement