> -----Original Message-----
> From: Elly Wisata [mailto:elly.wisata@stripped]
> Sent: Thursday, March 18, 2004 1:55 AM
> To: mysql@stripped
> Cc: 'BGLefty'
> Subject: RE: php script for new database and user
> I don't think php script can create database. But maybe I am wrong.
> If I am, please somebody make it straight.
> Create a database should do it through console or some kind like
Well, phpMyAdmin can create databases. And if im not wrong its just a
bundle of php-scripts.
So maybe just install phpMyAdmin and create a DB. Iirc u can see the
commands it does to create.
php is only providing an interface to mysql. If wish to script a database
creation you can definitely use PHP. As soon as you authenticate to mysql
via mysql_connect(host,user,pass) you have the rights of that mysqluser,
then you can create all the dbs you want through regular SQL, using PHP's
mysql_query('CREATE DATABASE PHP_TEST');
mysql_query('CREATE TABLE STATEMENT')
But if you just want to get some datbases created, then it may just be
easier to use the command line/PHPmyAdmin/MySQLCC/lots of other programs.
[NightGhost] on AO forum: "Perhaps it doesn't take two to make an
idiotic argument, although you have proven for a fact, that one man
indeed can make two idiotic arguments."
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1