How do you programmatically create an empty database?

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Nov 23 16:17:50 EST 2010


Hi Jonathan,

You need to connect to the SQL server using the terminal (i.e. the shell function), login as root and execute the command to create the database. It is also possible to write a PHP script and have it create the database, if you are connecting to a web server. Sometimes you need to do all of this over SSH. Depending on your setup, it might be easy or impossible. Perhaps we can figure that out if you provide more info.

Since usually you need to do this only once, it is easier to create the database manally. Once the database itself has been created, you can create all tables and fields by means of a script from RunRev.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

How to receive a free Color Converter license http://qurl.tk/kv (read the conditions)

On 23 nov 2010, at 22:09, Jonathan Lynch wrote:

> I have been looking through the docs, and this does not seem obvious to me.
> 
> I see that opening a nonexistent database using the SQlite driver will
> create one - but that only applies to SQLite.
> 
> It would seem that the standard way to do this, would be to use
> revExecuteSql, but that command requires having a database ID, which would
> mean that the database would need to already exist.
> 
> I apologize for my complete ignorance of database lore.
> 
> Thanks,
> 
> J





More information about the use-livecode mailing list