Updated README
This commit is contained in:
parent
05281acae2
commit
60177e8036
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue