From: Peter Brawley Date: October 21 2011 2:51pm Subject: Re: How to dynamically create database and tables on mysql? List-Archive: http://lists.mysql.com/mysql/226151 Message-Id: <4EA186E7.4050700@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/21/2011 3:05 AM, 王科选 wrote: > Hi, > Is there any way to dynamically create database and tables on mysql? > For example, if I want to create 100 databases(dbname is unknown until > run time), with 100 predefined tables in it, how to achieve that? > Thanks in advance! > Easiest mebbe from a scripting language like Perl or PHP, but you could also do it with PREPARE in a MySQL stored procedure. PB