Home

Awesome

MySQL Tools

Collection of scripts that enhance another MySQL tools :)

Load Data

The load_data.sh is a bash code script that allows you to:

Requirements:

Settings

This values can be modified to suit better your needs.

Also:

File name: /root/.my.cnf
File permission: chown 644 /root/.my.cnf
File contents:
[client]
user=root
password=p@$$w0rd

Run

To run the script you only need to execute this line:

./load_data.sh "/path/to/the/file"

Right now, the script can only load non-extended INSERT files, which means, files with this kind of inserts:

INSERT INTO `actor` VALUES (1,'PENELOPE','GUINESS','2006-02-15 02:34:33');
INSERT INTO `actor` VALUES (2,'NICK','WAHLBERG','2006-02-15 02:34:33');
INSERT INTO `actor` VALUES (3,'ED','CHASE','2006-02-15 02:34:33');
INSERT INTO `actor` VALUES (4,'JENNIFER','DAVIS','2006-02-15 02:34:33');

Coming soon, "LOAD DATA" types