20 lines
468 B
Bash
20 lines
468 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if command -v mysql &> /dev/null; then
|
||
|
|
||
|
mariadb_host="127.0.0.1"
|
||
|
mariadb_port="3306"
|
||
|
mariadb_user="root"
|
||
|
mariadb_password=""
|
||
|
root="$(pwd)"
|
||
|
|
||
|
[[ -f Secrets.sh ]] && source Secrets.sh
|
||
|
|
||
|
for i in $(find ../MariaDB -type f|grep .sql|sort|cat); do
|
||
|
echo $root/$i
|
||
|
mysql --host=$mariadb_host --port=$mariadb_port --user=$mariadb_user --password=$mariadb_password < $root/$i
|
||
|
done
|
||
|
|
||
|
else
|
||
|
echo "Please, install mariadb-client or mysql-client."
|
||
|
fi
|