Simplify MariaDB installation script
This commit is contained in:
parent
6af3888fda
commit
180997be4a
@ -6,7 +6,7 @@ cd $(realpath $(dirname "${0}"))/install
|
|||||||
# Create MariaDB instance
|
# Create MariaDB instance
|
||||||
mkdir -p /srv/mariadb/conf /srv/mariadb/data
|
mkdir -p /srv/mariadb/conf /srv/mariadb/data
|
||||||
chown 3306:3306 /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
|
# Configure MariaDB
|
||||||
cp srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf
|
cp srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf
|
||||||
@ -19,8 +19,3 @@ fi
|
|||||||
# Install service
|
# Install service
|
||||||
cp etc/init.d/mariadb /etc/init.d/mariadb
|
cp etc/init.d/mariadb /etc/init.d/mariadb
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Configure MariaDB admin
|
|
||||||
service mariadb start
|
|
||||||
cat adminpwd.sql | lxc-attach mariadb -- mysql
|
|
||||||
service mariadb stop
|
|
||||||
|
@ -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;
|
|
Loading…
Reference in New Issue
Block a user