RSYNC script for automated backup for CentOS


DT=$(date +%d%m%y)

rm -f /home/sshuser/sqldump/*sql
$SSH -i $KEY $RUSER@$RHOST mysqldump -u root -ppassword databasename > /home/sshuser/sqldump/databasename.sql
cd /home/sshuser/sqldump/

mysql -u root -ppassword databasename < databasename.sql

Re-Starting MySQL & Web Service
service mysqld restart
service httpd restart

Path Details

Output Details in Localhost
Remote Server Html Files will be Copied to Localhost /var/www/html
databasename.sql Backup will Done from Remote Server to localhost Server Backup Path /home/sshuser/sqldump
databasename.sql will Restore in localhost Database

Phpmyadmin for CentOS

PHPMyadmin :
phpMyAdmin is an open source tool used for the administration of MySQL. In addition to offering the capability to perform administration tasks such as creating, editing, or deleting databases, and managing users and permissions, phpMyAdmin provides a graphical user interface to do all of these tasks

Features of phpMyAdmin :
1) Friendly web interface
2) Supported most of the MySQL features
3) Browse and drop databases, tables, views, fields and indexes.
4) Create, copy, drop, rename and alter databases, tables, fields and indexes
5) Manage MySQL users and there privileges
6) Import data from CSV and SQL
7) Administering multiple servers

Output Details :
Output –> http://IP-Address/phpmyadmin

Manual Installation :
yum -y update

yum -y install phpmyadmin

service httpd restart

Phpmyadmin Script for CentOS :

echo “Add the EPEL Repository”

rpm -iUvh

echo “Updating Packages”

yum -y update

echo “Install phpMyAdmin”

yum -y install phpmyadmin

echo “Re-Starting Apache Service”

service httpd restart

echo “Installation is Completed”

echo -e “Please check with http://Ip-address/phpmyadmin&#8221;

echo -e “Login Details: Use MySQL Username & Password”