php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9070 Can only create "test" databases.
Submitted: 2001-02-02 07:06 UTC Modified: 2001-02-03 16:52 UTC
From: kane at idworld dot net Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.0 OS: WinME
Private report: No CVE-ID: None
 [2001-02-02 07:06 UTC] kane at idworld dot net
I cannot seem to create a database unless it begins with the word "test" in it's name.  However I am able to make any database I feel like when using the MySQL shell directly.  The following works:

	$query = "CREATE DATABASE test_user_again";
	$result = @mysql_query($query, $connection) or die ("Couldn't create database");

However this does not:

	$query = "CREATE DATABASE my_db";
	$result = @mysql_query($query, $connection) or die ("Couldn't create database");

Nor does any other name I use unless it begins with "test". I've tried using the 'mysql_create_db' function with the same results.  Any help would be greatly appreciated. 

Thanks,
Kane T.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-03 16:52 UTC] kane at idworld dot net
This was not a PHP problem, but rather a configuration problem with MySQL.  I had not configured my username to permission to create databases.  MySQL then limited me to creating databases which began with the word 'test'.  For more information see the MySQL 'manual.html' file.  (Do a search for "starting with 'test'" and you should find it pretty fast). 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC