i'm looking for a software that i can use to fill a mysql db (structure created by joomla, drupal or any CMS or script) with samples data for tot MB, so i can decide to put 400 MB of data in my tables to test my db and mysql engine. Is there something like this? Thanks very much ;) Nik
-
1Having xMB of data doesn't help you test something unless it has a particular distribution of values that matches up with what you're trying to test.– womble ♦Oct 24, 2009 at 11:30
-
He's asking for sample data for specific applications, which I think is a reasonable question to ask.– duffbeer703Oct 24, 2009 at 16:08
-
Unfortunately you need to be far more specific than this - what KIND of data to put into which tables - and writing scripts to generate it can be quite an onerous task. I spent three months on this last year.– MarkROct 24, 2009 at 20:48
5 Answers
I know drupal 6 specifically the devel module allows you to generate random dummy text: http://drupal.org/project/devel
Just answering to help someone who've landed here after gloogling for a similar subject......
- go to http://kedar.nitty-witty.com/blog/generate-dummy-test-data-for-mysql-using-routines and download the sql code
enter at the sql client and load
sql> source '/my/downloaded/script';
fill your tables
sql> use test;
sql> call pupulate('test','tablename',1000,'N');
now you have 1000 rows in your table 'test.tablename'
if you put your data into a comma separated value file, you can use the LOAD DATA command. Here is a page discussing how to import CSV data into mysql
LOAD DATA LOCAL INFILE '/importfile.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3);
here is a shortcut to run the LOAD DATA command.
To import from joomla, drupal, etc, you might need to export and convert into csv.
you can create one sample db , take your dump with:
#mysqldump databasename > dumpfile.sql
then use anywhere on any database using:
#mysql databasename < dumpfile.sql
You can try http://filldb.info/ Automatically generate data and fill your database tables with dummy data.