The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding MySQL user via script.

Discussion in 'General Discussion' started by fwwebs, Sep 14, 2004.

  1. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    I've created a PHP script to add a MySQL database and user with permissions to the database. The database and user adds fine, except for the password. The user is given the correct permissions for the appropriate database, as verified by cPanel, but they can't connect to the database because of a password error. I can go into cPanel and recreate the user with the same exact username and password and connection to the database is then possible. No changing permissions or adding the user to a database is necessary, as it was done by the script originally. At first I thought that the password was corrupt, so I editted the script to show the cPanel output and cPanel shows all of the correct information for the username and password.

    Any Ideas.
     
  2. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    Anyone ever try a script like this?
     
  3. cguimont

    cguimont Well-Known Member

    Joined:
    Jul 13, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I am not sure whether the password you need to send to MYSQL is encrypted...

    If so, check your encryption.
     
  4. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    The output from cPanel when adding the MySQL user shows the correct username and password, the same as when added through cPanel itself.
     
Loading...

Share This Page