2003-02-13 18:21:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/* default values are localhost, root and empty password
|
|
|
|
Change the values if you use another configuration */
|
2005-01-07 14:59:59 +00:00
|
|
|
$driver = new mysqli_driver;
|
|
|
|
|
|
|
|
if (!$driver->embedded) {
|
|
|
|
$host = "localhost";
|
|
|
|
$user = "root";
|
|
|
|
$passwd = "";
|
|
|
|
} else {
|
2005-06-22 13:41:59 +00:00
|
|
|
$path = dirname(__FILE__);
|
2006-03-24 09:32:24 +00:00
|
|
|
$host = ":embedded";
|
|
|
|
$user = $passwd = NULL;
|
2005-01-07 14:59:59 +00:00
|
|
|
$args = array(
|
|
|
|
"--datadir=$path",
|
|
|
|
"--innodb_data_home_dir=$path",
|
|
|
|
"--innodb_data_file_path=ibdata1:10M:autoextend",
|
2006-07-11 23:43:55 +00:00
|
|
|
"--log-error=$path/testrun.log",
|
|
|
|
"--init-connect='CREATE DATABASE IF NOT EXISTS test;'"
|
2005-01-07 14:59:59 +00:00
|
|
|
);
|
2006-07-11 23:42:58 +00:00
|
|
|
$driver->embedded_server_start(TRUE, $args, NULL);
|
2005-01-07 14:59:59 +00:00
|
|
|
}
|
2003-02-13 18:21:37 +00:00
|
|
|
|
|
|
|
?>
|