database permission by php

Discussion in 'PHP' started by promotingspace.net, Feb 14, 2009.

  1. #1
    Hi
    when installing a cms, I want to create a database (by the php code)
    but in cpanel, when we create the database, we have to add the user to the database
    so is it possible to create the database by php code and add the user to it?
    thanks for your help.
     
    promotingspace.net, Feb 14, 2009 IP
  2. dowhile

    dowhile Active Member

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    Yes you can, but you need privileges. Did you ever use phpMyAdmin, it is PHP script, and from this script you can add databases and users, etc.
     
    dowhile, Feb 14, 2009 IP
  3. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #3
    joebert, Feb 15, 2009 IP