Monday, December 18, 2017

Script to import table through bash script in Mysql Server




#!/bin/bash

for table in `ls /opt/databasebackup/ | grep sql`

do

    echo "Importing $table"
        /opt/lampp/bin/mysql -uroot -pPassword databasename < /opt/databasebackup/$table


done

echo "Press Any key to continue.."
read p





Thanks
nirmal Singh

No comments:

Post a Comment

Linux server hardening | Secure Linux Servers

 Linux server hardening is the process of securing a Linux server by reducing its attack surface and mitigating security risks. The goal is ...