-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14403e5
commit 00df5c3
Showing
2 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...resourcemanager/azure-resourcemanager-compute/src/test/assets/install_mysql_server_5.7.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
mysqlPassword=$1 | ||
sudo apt-get update | ||
#no password prompt while installing mysql server | ||
#export DEBIAN_FRONTEND=noninteractive | ||
|
||
#another way of installing mysql server in a Non-Interactive mode | ||
echo "mysql-server-5.6 mysql-server/root_password password $mysqlPassword" | sudo debconf-set-selections | ||
echo "mysql-server-5.6 mysql-server/root_password_again password $mysqlPassword" | sudo debconf-set-selections | ||
|
||
#install mysql-server 5.6 | ||
sudo apt-get -y install mysql-server-5.7 | ||
|
||
#set the password | ||
#sudo mysqladmin -u root password "$mysqlPassword" #without -p means here the initial password is empty | ||
|
||
#alternative update mysql root password method | ||
#sudo mysql -u root -e "set password for 'root'@'localhost' = PASSWORD('$mysqlPassword')" | ||
#without -p here means the initial password is empty | ||
|
||
#sudo service mysql restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters