From: Dan Nelson Date: May 25 2007 6:53pm Subject: Re: Need script to populate data. List-Archive: http://lists.mysql.com/mysql/207010 Message-Id: <20070525185357.GK98411@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (May 25), SRM SRM said: > Thanks for your help. I'm not able to ssh into this box - how can I > run this script, basically all I have to work with is MySQL Query > Broswer. You can generate data by using a stroed procedure, too. I prefer this method because it doesn't require any external software: drop procedure if exists populate; delimiter // create procedure populate() begin declare i int; set i = 0; start transaction; while i < 10000 do insert into mytable (forumid, styleid, title, title_clean, description, description_clean, options) values (i, i, concat("Title",i), concat("Title",i), concat("Desc",i), concat("Desc",i) , 0); set i = i + 1; if i % 1000 = 0 then start transaction; end if; end while; commit; end; // delimiter ; call populate(); drop procedure populate; -- Dan Nelson dnelson@stripped