Skip to content

Commit 4f0c3a5

Browse files
committed
update mysql installer function
1 parent 54dc27a commit 4f0c3a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ setup-ssh-keys(){
6868
wait-to-continue
6969
}
7070

71+
# Note this function is not currently being used, as time goes on, we will use
72+
# this script to install and setup mysql as well
7173
install-mysql(){
7274
echo 'We are now going to install and configure MySQL, the database managment system we will'
7375
echo 'use for this course.'
@@ -84,7 +86,7 @@ install-mysql(){
8486
# set a password for the root user, make sure no other users exist, and drop the test db
8587
# password will be 'codeup'
8688
mysql -u root <<-EOF
87-
UPDATE mysql.user SET Password=PASSWORD('codeup') WHERE User='root';
89+
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('codeup');
8890
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
8991
DELETE FROM mysql.user WHERE User='';
9092
DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';

0 commit comments

Comments
 (0)