我有这样的代码:为什么我不能在MySQL中创建数据库抛出PHP?
$link = mysql_connect("localhost", "ctmanager", "blablabla");
if (! $link)
die ("I cannot connect to MySQL.<br>\n");
else
print "Connection is established.<br>\n";
// Create the "ct" database.
mysql_query("create database ct", $link) or die("I cannot create the DB: ".mysql_error()."<br>\n");
我收到此错误信息:
I cannot create the DB: Access denied for user 'ctmanager'@'%' to database 'ct'
没有任何人有任何想法,为什么我不能创建一个数据库,为什么我在“@%”符号错误信息?
ADDED
ctmanager
是管理员。他应该有权限添加数据库和用户。
问题是,ctmanager是一个特权用户。 – Roman 2010-06-16 12:09:49
SHOW GRANTS说什么? – 2010-06-16 13:01:32