Create MySQL user and database from PHP
        Posted  
        
            by snaken
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by snaken
        
        
        
        Published on 2010-04-30T15:30:30Z
        Indexed on 
            2010/04/30
            15:37 UTC
        
        
        Read the original article
        Hit count: 346
        
Hi,
Is there a way to create a new MySQL database, a new MySQL user and give the new user priviledges on the new database all using PHP?
I've seen examples where mysql_query is used like this:
mysql_query("CREATE DATABASE ".$dbname)or die(mysql_error());
but i don't see how this would work as there's no database connection.
Help please!
© Stack Overflow or respective owner