Advertisement
metalx1000

Fix MySQL PHPmyAdmin problems - notes

Mar 14th, 2019
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.62 KB | None | 0 0
  1. #purge all mysql
  2. sudo apt purge $(aptitude search mysql|grep ^i|sed 's/ A/ /g'|awk '{print $2}'|tr "\n" " ")
  3.  
  4. #purge all php
  5. sudo apt purge $(aptitude search php|grep ^i|sed 's/ A/ /g'|awk '{print $2}'|tr "\n" " ")
  6.  
  7. #auto remove any clean up
  8. sudo apt-get autoremove -y
  9.  
  10. #reinstall
  11. sudo apt install phpmyadmin mysql-server
  12.  
  13.  
  14. ##reset password##
  15. sudo mysql
  16. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NEWPASSWORD';
  17.  
  18. ##Disable passwords if needed##
  19. sudo /etc/init.d/mysql stop
  20. sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
  21. #add 'skip-grant-tables' under [mysqld]
  22. sudo /etc/init.d/mysql start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement