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.

Database Unmap Tool

Discussion in 'Database Discussions' started by milindras, Jan 31, 2011.

  1. milindras

    milindras Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi,
    Is there any way to unmap a mysql database (without deleting database & user) with a cpanel account.
    What happened was I mapped a database & user to a wrong cpanel account.
    I can't see any unmap tool.

    Thanks
    Milindra
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Milindra,

    Simply re-map the database and user to a new account and it should re-map it to that new one. You don't need to un-map--you simply need to re-map it.

    Thanks.
     
  3. milindras

    milindras Member

    Joined:
    Dec 29, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Thanks. I can re map the database to the new one. But how do I un map from the other account? (old account)
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If it is not changing the mapping when switching the database to re-map to a new user, go to /var/cpanel/databases area, find the olduser.yaml file and remove the database entry in that file after making a backup of the file:

    Code:
    cd /var/cpanel/databases/
    cp olduser.yaml olduser.yaml.bak
    Additionally, if the /var/cpanel/databases/dbindex.db file didn't update the user ownership for that database, change the user ownership for the database in that file after backing up the file.

    Please note that the mapping tool simply allows control of the database via cPanel > MySQL Databases area.
     
Loading...

Share This Page