diff options
author | startxfr <clarue@startx.fr> | 2014-11-29 04:11:44 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2014-11-29 04:11:44 +0100 |
commit | de3cd0a17a285afa0dd783ec11024c992f4aa3ff (patch) | |
tree | 673c92818acfa12d02f3342b94747d8792586212 /Services/mariadb/mariadb_run.sh | |
parent | 6d20210fdecb7dda4181b5a743d104644d5dfbaa (diff) | |
download | phpmyadmin-de3cd0a17a285afa0dd783ec11024c992f4aa3ff.tar.gz phpmyadmin-de3cd0a17a285afa0dd783ec11024c992f4aa3ff.tar.bz2 phpmyadmin-de3cd0a17a285afa0dd783ec11024c992f4aa3ff.tar.xz phpmyadmin-de3cd0a17a285afa0dd783ec11024c992f4aa3ff.zip |
modif pour mise en place avancé de mariadb
Diffstat (limited to 'Services/mariadb/mariadb_run.sh')
-rw-r--r-- | Services/mariadb/mariadb_run.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Services/mariadb/mariadb_run.sh b/Services/mariadb/mariadb_run.sh deleted file mode 100644 index b5b1421..0000000 --- a/Services/mariadb/mariadb_run.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -ln -s /dev/stderr /var/log/mysql/mysqld.log -if [ ! -f /var/lib/mysql/.created ]; then - function wait_for_mysqld_start { - for i in {1..30}; do - if echo 'select 1' | mysql -u root > /dev/null 2>&1; then - return 0 - fi - sleep 1 - done - - echo "MariaDB did not start in time" - exit 1 - } - - - - password=${DB_PASSWORD:-password} - dbname=${DB_NAME:-master} - - /usr/bin/mysql_install_db -u mysql - - /usr/libexec/mysqld & - pid=$! - - wait_for_mysqld_start - - echo "Creating database $dbname ..." - - sql=$(cat <<SQL - drop database if exists test; - create database \`$dbname\` - DEFAULT CHARACTER SET utf8 DEFAULT - COLLATE utf8_general_ci; -SQL -) - echo $sql | mysql -u root - - #delete from user; - - sql=$(cat <<SQL - delete from user where user=''; - grant all on *.* to 'mysql'@'localhost' identified by '$password' with grant option; - grant all on *.* to 'mysql'@'%' identified by '$password' with grant option; - flush privileges; -SQL -) - echo $sql | mysql -u root mysql - - touch /var/lib/mysql/.created - kill -TERM $pid - - echo "Starting mysqld ..." -fi - -exec /usr/libexec/mysqld
\ No newline at end of file |