Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions scripts/mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,26 @@ if [ $2 == "true" ]; then

service mysql restart
fi

# Add .my.ini file
cat <<EOT >> ~/.my.cnf
[client]
user=root
password="$1"

[mysql]
user=root
password="$1"

[mysqldump]
user=root
password="$1"

[mysqldiff]
user=root
password="$1"
EOT
chmod 600 ~/.my.cnf
cp ~/.my.cnf /home/vagrant
chown vagrant:vagrant /home/vagrant/.my.cnf
chmod 600 /home/vagrant/.my.cnf