Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. $ sudo /etc/init.d/mysql stop
  2. * Stopping MySQL database server mysqld [ OK ]
  3. [1]- Exit 1 sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
  4. [2]+ Exit 1 sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking
  5. reg@regDesktopHome:~$ sudo mysqld --skip-grant-tables &
  6. [1] 13651
  7. reg@regDesktopHome:~$ 140627 19:02:02 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
  8.  
  9. reg@regDesktopHome:~$ mysql -u root mysql
  10. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  11. reg@regDesktopHome:~$ sudo mysql -u root mysql
  12. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  13. [1]+ Exit 1 sudo mysqld --skip-grant-tables
  14.  
  15. $ ps ax| grep mysql
  16. 16515 ? Ssl 0:00 /usr/sbin/mysqld
  17. 16551 pts/23 S+ 0:00 grep --color=auto mysql
  18. reg@regDesktopHome:~/semios/v3upgrade$ sudo kill -9 16515
  19. reg@regDesktopHome:~/semios/v3upgrade$ ps ax| grep mysql
  20. 16678 ? Ssl 0:00 /usr/sbin/mysqld
  21. 16715 pts/23 S+ 0:00 grep --color=auto mysql
  22. reg@regDesktopHome:~/semios/v3upgrade$ mysql -u root
  23. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  24.  
  25. mysql -u root -p
  26.  
  27. apt-cache policy mysql-server
  28.  
  29. Installed: 5.5.37-0ubuntu0.12.04.1
  30.  
  31. sudo dpkg-reconfigure mysql-server-*.*
  32.  
  33. mysql -u root -p
  34.  
  35. sudo service mysql stop
  36.  
  37. sudo killall -9 mysqld
  38.  
  39. sudo mysqld_safe --skip-grant-tables --skip-networking &
  40.  
  41. mysql -u root
  42.  
  43. FLUSH PRIVILEGES;
  44.  
  45. UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
  46.  
  47. UPDATE mysql.user SET authentication_string=PASSWORD('newpwd') WHERE User='root';
  48.  
  49. FLUSH PRIVILEGES;
  50.  
  51. exit
  52.  
  53. sudo killall mysqld_safe && sudo service mysql start
  54.  
  55. mysql -u root -p
  56. Enter password: newpass
  57. mysql>
  58.  
  59. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';
  60.  
  61. UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
  62. FLUSH PRIVILEGES;
  63.  
  64. mysqld_safe --init-file=/home/me/mysql-init &
  65.  
  66. sudo service mysql stop
  67. sudo mysqld_safe &
  68. sudo mysql -u root
  69.  
  70. ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
  71. FLUSH PRIVILEGES;
  72. QUIT;
  73.  
  74. sudo killall mysqld
  75. sudo service mysql start
  76. sudo mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement