CREATE-DATABASE — create a databaseFunction
connection-specA connection specification
database-typeA database type specifier, i.e. a keyword. This defaults to the value of *default-database-type*
successA boolean flag. If T, a new database was
successfully created.
(create-database '("localhost" "new" "dent" "dent") :database-type :mysql)
=> T
(create-database '("localhost" "new" "dent" "badpasswd") :database-type :mysql)
=>
Error: While trying to access database localhost/new/dent
using database-type MYSQL:
Error database-create failed: mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
has occurred.
[condition type: CLSQL-ACCESS-ERROR]
An exception will be thrown if the database system does not allow new databases to be created or if database creation fails.
This function may invoke the operating systems
functions. Thus, some database systems may require the
administration functions to be available in the current
PATH. At this time, the
:mysql backend requires
mysqladmin and the
:postgresql backend requires
createdb.
create-database is a CLSQL extension.