Use a shell script like this:
#!/usr/bin/env bash
cd yourdirectory
for f in *.csv
do
mysql -e "USE yourDatabase LOAD DATA LOCAL INFILE '"$f"'INTO TABLE yourtable"
done
More Related Contents:
- Import CSV to Update rows in table
- If two columns are 1 then make new column
- Import data in MySQL from a CSV file using LOAD DATA INFILE
- MySQL: How to reset or change the MySQL root password?
- MySQL Server has gone away when importing large sql file
- MySQL : isn’t in GROUP BY
- MySQL: Can’t create table (errno: 150)
- How to import data from text file to mysql database
- Why is the estimated rows count very different in phpmyadmin results?
- How to import XML file into MySQL database table using XML_LOAD(); function
- Migrate from Oracle to MySQL
- How to access remote server with local phpMyAdmin client?
- Regaining access to lost MySQL password for PHPMyAdmin on WAMP
- Bug? #1146 – Table ‘xxx.xxxxx’ doesn’t exist
- Creating functions in phpMyAdmin – Error: access denied you need the super privilege for this operation
- #1273 – Unknown collation: ‘utf8mb4_unicode_ci’ cPanel
- Error Dropping Database (Can’t rmdir ‘.test\’, errno: 17)
- phpMyAdmin is throwing a #2002 cannot log in to the mysql server phpmyadmin
- How can I import a database with MySQL from terminal?
- ERROR 1148: The used command is not allowed with this MySQL version
- phpMyAdmin – can’t connect – invalid setings – ever since I added a root password – locked out
- Can’t import database through phpmyadmin file size too large
- SQL: deleting tables with prefix
- #1292 – Incorrect date value: ‘0000-00-00’ [duplicate]
- #1130 – Host ‘localhost’ is not allowed to connect to this MySQL server
- How do I write an SP in phpMyAdmin (MySQL)?
- How to import large sql file in phpmyadmin
- How to get back Lost phpMyAdmin Password, XAMPP
- UTF8 problem with MySQL 5
- mySQL query to search all tables within a database for a string?