Why I cannot create DB in MySQL throw PHP?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-06-16T10:01:16Z Indexed on 2010/06/16 10:12 UTC
Read the original article Hit count: 169

Filed under:
|

I have this code:

$link = mysql_connect("localhost", "ctman", "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");

And I get this error message:

I cannot create the DB: Access denied for user 'ctmanager'@'%' to database 'ct'

Does anybody have any idea why I cannot create a DB and why I have '@%' symbols in the error message?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql