Advertisement
Guest User

Untitled

a guest
Nov 11th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. SHELL := /bin/bash
  2.  
  3. default:
  4. @echo "Welcome!";
  5. echo -n "Please enter the MySQL host (default: localhost):";
  6. read host;
  7. host=${host:-localhost};
  8. echo -n "Please enter the MySQL username:";
  9. read username;
  10. echo -n "Please enter the MySQL password:";
  11. read -s password;
  12. mv includes/config.php.example includes/config.php 2>/dev/null;true;
  13. sed 's/"USER", ""/"USER", "$(username)"/g' includes/config.php > includes/config.php;
  14. sed 's/"PASSWORD", ""/"PASSWORD", "$(password)"/g' includes/config.php > includes/conf$
  15. echo $username;
  16. echo $password;
  17. mysql -u "$username" -p"$password" codeday-team < ./codeday-team.sql;
  18. echo "Configuration complete. For further configuration options, check the config file$
  19. exit 0;
  20.  
  21. Welcome!
  22. Please enter the MySQL host (default: localhost):
  23. Please enter the MySQL username:<snip>
  24. Please enter the MySQL password:sername
  25. assword
  26. ERROR 1045 (28000): Access denied for user 'sername'@'localhost' (using password: YES)
  27. Configuration complete. For further configuration options, check the config file includes/config.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement