dedeanshi

Install MariaDB (MIROR) Debian 9

May 15th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.11 KB | None | 0 0
  1. apt-get install -y software-properties-common dirmngr
  2.  
  3. apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
  4.  
  5. add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.4/debian stretch main'
  6.  
  7. apt-get update
  8.  
  9. apt-get install -y --allow-unauthenticated mariadb-server mariadb-client
  10.  
  11. mysql_secure_installation
  12.  
  13.  
  14.     Enter current password for root (enter for none):  << No Password - Press Enter
  15.  
  16.     Switch to unix_socket authentication [Y/n] N  << Disabling Unix Socket login and enabling password Login
  17.  
  18.     Change the root password? [Y/n] Y  << Change MariaDB root password
  19.  
  20.     New password:   << Enter Password
  21.  
  22.     Re-enter new password:   << Re-Enter Password
  23.  
  24.     Remove anonymous users? [Y/n] Y  << Remove Anonymous users
  25.  
  26.     Disallow root login remotely? [Y/n] Y  << Disallow root login remotely
  27.  
  28.     Remove test database and access to it? [Y/n] Y  << Remove test database
  29.  
  30.     Reload privilege tables now? [Y/n] Y  << Reload privilege
  31.  
  32.  
  33.  
  34. systemctl stop mariadb
  35.  
  36. systemctl start mariadb
  37.  
  38. systemctl status mariadb
  39.  
  40. mysql -u root -p
  41. #Password required
Add Comment
Please, Sign In to add comment