diff --git a/mariadb/install.sh b/mariadb/install.sh index fef5b42..b1796e4 100755 --- a/mariadb/install.sh +++ b/mariadb/install.sh @@ -6,7 +6,7 @@ cd $(realpath $(dirname "${0}"))/install # Create MariaDB instance mkdir -p /srv/mariadb/conf /srv/mariadb/data chown 3306:3306 /srv/mariadb/data -lxc-execute mariadb -- mysql_install_db --user=mysql +lxc-execute mariadb -- mysql_install_db --user=mysql --datadir=/var/lib/mysql --auth-root-authentication-method=socket --skip-test-db # Configure MariaDB cp srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf @@ -19,8 +19,3 @@ fi # Install service cp etc/init.d/mariadb /etc/init.d/mariadb rc-update -u - -# Configure MariaDB admin -service mariadb start -cat adminpwd.sql | lxc-attach mariadb -- mysql -service mariadb stop diff --git a/mariadb/install/adminpwd.sql b/mariadb/install/adminpwd.sql deleted file mode 100644 index a33a272..0000000 --- a/mariadb/install/adminpwd.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM mysql.user WHERE User != 'root' OR Host != 'localhost'; -INSTALL PLUGIN unix_socket SONAME 'auth_socket'; -UPDATE mysql.user SET plugin='unix_socket'; -FLUSH PRIVILEGES; -DROP DATABASE IF EXISTS test;