Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a very big table for users as below:

CREATE TABLE `karbar` (
 `uid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
 `email` varchar(70) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
 `password` char(41) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
 `token` char(40) NOT NULL,
 `joined` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 `totalspam` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `flname` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
 `activation_link` char(40) NOT NULL,
 `role` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `gender` char(1) NOT NULL DEFAULT 'u',
 `is_shop_active` char(0) DEFAULT '',
 `english_name` varchar(30) NOT NULL,
 `followings` mediumint(8) unsigned NOT NULL DEFAULT '0' ,
 `followers` mediumint(8) unsigned NOT NULL DEFAULT '0' ,
 PRIMARY KEY (`uid`),
 UNIQUE KEY `email` (`email`),
) ENGINE=InnoDB

I want to fill this table with lots of data. Let's say millions of records. How to do this? I need to produce unique emails. Different data for emails. I know I can use CONCAT but don't know how to produce random data

share|improve this question
    
So you need to fill those fileds with random data ? –  Up_One Jan 23 at 15:36
    
@Up_One, Your comment really helped ;-) I'm looking for a procedure to do that for me. How to write a procedure to complete this task? –  john.locke Jan 23 at 15:40
    
Why inventing the wheel ? "nothing is created everything is copied" kkk –  Up_One Jan 23 at 15:45

2 Answers 2

up vote 1 down vote accepted

Ok i got your answer ! Go to Talend download page and download the Talend Open Studio for Data Integration. Is free and uses Java to work. After you downladed and installed talend go to this link to see how to generate what ever you need for free I am using Talend for stress testing and ETL process You can throw the generated data mysql directly or into a CVS file and then load it into the mysql table !

share|improve this answer

An easy php based web application to produce very realistic data to populate your table.

Its online site has limitation, but if you download the source code and install it on your PC then you can generate every kind of data that you want.
It supports csv,sql,html,etc file formats.

enter image description here

Data generator for Oracle,MySQL,Postgres,SQL lite and more

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.