Merge pull request #54 from chmouel/mycnf
Set sensible default for mysql client
This commit is contained in:
commit
c576a7cd6d
1 changed files with 10 additions and 0 deletions
10
stack.sh
10
stack.sh
|
@ -318,6 +318,16 @@ mysql-server-5.1 mysql-server/root_password_again password $MYSQL_PASS
|
||||||
mysql-server-5.1 mysql-server/start_on_boot boolean true
|
mysql-server-5.1 mysql-server/start_on_boot boolean true
|
||||||
MYSQL_PRESEED
|
MYSQL_PRESEED
|
||||||
|
|
||||||
|
if [[ ! -e $HOME/.my.cnf ]]; then
|
||||||
|
cat <<EOF >$HOME/.my.cnf
|
||||||
|
[client]
|
||||||
|
user=$MYSQL_USER
|
||||||
|
password=$MYSQL_PASS
|
||||||
|
host=$MYSQL_HOST
|
||||||
|
EOF
|
||||||
|
chmod 0600 $HOME/.my.cnf
|
||||||
|
fi
|
||||||
|
|
||||||
# Install and start mysql-server
|
# Install and start mysql-server
|
||||||
sudo apt-get -y -q install mysql-server
|
sudo apt-get -y -q install mysql-server
|
||||||
# Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
|
# Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
|
||||||
|
|
Loading…
Reference in a new issue