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.

mysql forward?

Discussion in 'General Discussion' started by frkandris, Aug 13, 2008.

  1. frkandris

    frkandris Member

    Joined:
    Mar 7, 2008
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    dear reader,

    we are about to move thousands of users from an old, handmade system to cpanel. the problem what we are facing right now is this:

    all the mysql db-names and db-users are about to change, because cpanel makes them uniqe with the cpusername_* naming method. all the files with dbconnections (thousands of them, actually) should be edited with the new data..

    i just wonder, if anybody here has an idea if this can be avoided. is mysql "maskable", i mean is it possible that somehow i connect to databaseX with userX and my connection is forwarded to databaseY with userY?

    any clue is highly appreciated, thanks in advice,
    andris
    --
     
  2. frkandris

    frkandris Member

    Joined:
    Mar 7, 2008
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    solved, hopefully

    meanwhile we've figured out, that the database is stored in a directory, so it can be symlinked:

    the old user can be created, granted, password set from sql:

    there are 2 problems we've found so far:
    • if the db-old-user==cpuser, then the password changing for the cpanel user modifies the password for the database aswell -> use uniq&different names for the cpanel users
    • moving accounts between cpanel machines will destroy this kind of "masking"

    i hope you may use this knowledge.

    if there is a more sophisticated method (f.e. an easy setting in mysql, whatever), please let me know.
     
Loading...

Share This Page