load-net

mariadb-server

Aug 9th, 2023 (edited)
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. apt update
  2. apt install mariadb-server
  3. mysql_secure_installation
  4.  
  5. mariadb
  6. GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1234566';
  7. GRANT ALL PRIVILEGES ON *.* TO 'dbrootpw'@'%' IDENTIFIED BY '1234566';
  8. FLUSH PRIVILEGES;
  9.  
  10.  
  11. find / -name *.cnf -print
  12.  
  13. /etc/mysql/mariadb.conf.d/50-server.cnf
  14.  
  15. 50-server.cnf
  16. # localhost which is more compatible and is not less secure.
  17. bind-address = 0.0.0.0
  18.  
  19. systemctl restart mariadb
  20. systemctl restart mysql
  21.  
  22. ss -antpl | grep 3306
  23. ss -tulpn | grep -E 'mysql|mariadb'
  24.  
  25. mysql -h 10.20.7.116 -uroot -p1234566
  26.  
  27.  
  28. systemctl stop mysql
  29. mysqld_safe --skip-grant-tables &
  30.  
  31. mysql -u root
  32.  
  33.  
  34. mysql
  35.  
  36. use mysql;
  37. update user set password=password("1234566") where user = 'root';
  38. flush privileges;
  39. exit;
Advertisement
Add Comment
Please, Sign In to add comment