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

Installing Jenkins on RHEL 8 is a straightforward process. Here's a step-by-step guide

Introduction  Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines...