Updated README

This commit is contained in:
Yavuz Aydın 2019-01-25 13:20:09 +01:00
parent 05281acae2
commit 60177e8036
1 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,8 @@ Allows you to create and restore local MySQL / MariaDB backups.
# Requirements #
Requires a /root/.my.cnf file which contains credentials so the user root can login to the MySQL server with sufficient privileges without entering a password. Example /root/.my.cnf contents:
Requires a /root/.my.cnf file which contains credentials so the user root can login to the MySQL / MariaDB server with sufficient privileges
without entering a password. Example /root/.my.cnf contents:
```
[client]
@ -22,7 +23,6 @@ sudo chmod 600 /root/.my.cnf
Test if it works with:
```
PING=$(sudo mysqladmin ping 2>/dev/null)
if [ "$PING" != "mysqld is alive" ]; then
clear && echo "Error: Unable to connect to MySQL Server!"
else
@ -54,5 +54,4 @@ DB='mytestdb'
BACKUPDIR='/var/backup/mysql/20190121-1540'
sudo mysql -e "CREATE DATABASE IF NOT EXISTS ${DB}"
sudo -i bash -c 'for table in ${BACKUPDIR}/${DB}/*; do gunzip -c $table | mysql ${DB}; done'
exit
```