Linux

Shell script to backup mySQL database

Shell script to backup MySql database mysql-backup.bash #!/bin/bash # Shell script to backup MySql database # To backup Nysql databases file to /backup dir and later pick up by your # script. You can skip few databases from backup too. # For more info please see (Installation info): # http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html # Last updated: Aug – […]

Read More
Scripting

Import csv data to mysql

This is a short note about how to import comma separated data, CSV, from a file into a mysql database from a shell. Log in to your mysql database and choose the database you are going to import into. Type in the following in the mysql console to import from the CSV file load data […]

Read More
Scripting

mySQL dump i batch mode

# mysql dbname -B -N -e “SELECT serial FROM serials” >/path/to/outfile -B or –batch: prints rows tab-separated and turns off the borders -N or –skip-column-names: leaves out the header row

Read More