Guest User

Untitled

a guest
Feb 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1.  
  2. [root@s15745022 /]# /etc/init.d/mysqld stop
  3. Stopping MySQL: [ OK ]
  4.  
  5.  
  6. //here i change the my.cnf, adding skip-grant-tables=1 under [mysqld]
  7.  
  8. [root@s15745022 /]# /etc/init.d/mysqld start
  9. Starting MySQL: [ OK ]
  10. [root@s15745022 /]# mysql -u root
  11. Welcome to the MySQL monitor. Commands end with ; or \g.
  12. Your MySQL connection id is 2
  13. Server version: 5.0.77 Source distribution
  14.  
  15. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
  16.  
  17. mysql> use mysql;
  18. Reading table information for completion of table and column names
  19. You can turn off this feature to get a quicker startup with -A
  20.  
  21. Database changed
  22. mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE User = 'root';
  23. Query OK, 0 rows affected (0.01 sec)
  24. Rows matched: 0 Changed: 0 Warnings: 0
  25.  
  26. mysql> Aborted
  27. [root@s15745022 /]# /etc/init.d/mysqld stop
  28. Stopping MySQL: [ OK ]
  29.  
  30. //here i change the my.cnf, removing skip-grant-tables=1 under [mysqld]
  31.  
  32. [root@s15745022 /]# /etc/init.d/mysqld start
  33. Starting MySQL: [ OK ]
  34. [root@s15745022 /]# mysql -u root -p
  35. Enter password:
  36. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  37. [root@s15745022 /]# mysql -u root -p
  38. Enter password:
  39. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  40. [root@s15745022 /]#
Add Comment
Please, Sign In to add comment