From e4e4d4e47a83faad1dcbbbb184b221183f47d00b Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Sat, 18 Mar 2023 16:36:33 -0700 Subject: [PATCH] move database option to mysql section --- bin/vhost-mysql-db-add.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/vhost-mysql-db-add.sh b/bin/vhost-mysql-db-add.sh index 5b10525..f2ed88e 100755 --- a/bin/vhost-mysql-db-add.sh +++ b/bin/vhost-mysql-db-add.sh @@ -80,9 +80,10 @@ if [[ -n $write ]]; then chmod 640 /srv/www/$domain/.my.cnf echo '[client]' > /srv/www/$domain/.my.cnf echo "host=127.0.0.1" >> /srv/www/$domain/.my.cnf - echo "database=$database" >> /srv/www/$domain/.my.cnf echo "user=$username" >> /srv/www/$domain/.my.cnf echo "password=$password" >> /srv/www/$domain/.my.cnf + echo '[mysql]' >> /srv/www/$domain/.my.cnf + echo "database=$database" >> /srv/www/$domain/.my.cnf touch /home/$vhost_username/.my.cnf chown $vhost_username:$vhost_username /home/$vhost_username/.my.cnf chmod 640 /home/$vhost_username/.my.cnf