Advertisement
josephxsxn

mysql56-install-basic.sh

Aug 19th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.99 KB | None | 0 0
  1. #!/bin/bash
  2. apt-get install -y software-properties-common
  3. debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password password PASS"
  4. debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password_again password PASS"
  5. wget -O "/etc/apt/sources.list.d/mysql.list" http://ad-cameron.aegisdoctrine.local/mysql.list
  6. #add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
  7. apt-get update
  8. apt install -y mysql-server-5.6 mysql-client-5.6 libmysql-java
  9. service mysql start
  10.  
  11. mysql -uroot -pPASS -e "SET PASSWORD = PASSWORD('');"
  12. mysql -u root -e "
  13. CREATE USER 'hadoop'@'%' IDENTIFIED BY 'hadoop12345';
  14. GRANT ALL PRIVILEGES ON *.* TO 'hadoop'@'%';
  15. FLUSH PRIVILEGES;
  16.  
  17. CREATE DATABASE ambari;
  18. CREATE DATABASE hive;
  19. CREATE DATABASE oozie;
  20. "
  21.  
  22. #clinet only
  23. #sudo apt-get install -y software-properties-common
  24. #sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
  25. #sudo apt-get update
  26. #sudo apt install -y mysql-client-5.6 libmysql-java
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement