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.

Cpanel mysql config

Discussion in 'General Discussion' started by chielsen, Feb 4, 2004.

  1. chielsen

    chielsen Member

    Joined:
    Jun 11, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Does anybody knows where cpanel writes the mysql config for each site? Which users and dbs are under each account.

    I have a database calles domaincom (from ensim). The user 'domaincom' is the cpanel user for that site. Its also the user for that db. When he goes to phpmyadmin, he sees his db and can use it. However, it isn't listed at the mysql page in cpanel, nor is the mysql user 'domaincom'. I would like to know if i could add those values to some kind of conifg file, so that the client can see his mysql dbs and users in his cpanel.
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Try adding the database and user to the user and db tables in the mysql database.

    From the command line type:

    Code:
    mysql -p mysql
    
    enter the root password for MySQL.

    Then enter:

    Code:
    insert into db values("localhost","domaincom_db","domaincom_cpanel_user","Y","Y","Y","Y","Y","Y","N","Y","Y","Y","Y","Y");
    
    insert into db values("localhost","domaincom_db","domaincom_db_user","Y","Y","Y","Y","Y","Y","N","Y","Y","Y","Y","Y");
    
    insert into user values("localhost","domaincom_db_user",password('<password>'),"N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","","","","",0,0,0);
    
    I modified some of the variables that needed to be changed, to make it more clear as to what each is referring to.

    <password> needs to be modified to be the domaincom MySQL password.

    You may need to flush the privileges:

    Code:
    flush privileges
    
    Then log into domaincom's CPanel and in the phpMyAdmin section, the database should be listed. I don't think it will be listed on the main MySQL database page.

    Hope this helps.
     
  3. chielsen

    chielsen Member

    Joined:
    Jun 11, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I did what do describe, but the thing is, i want it listed on the mysqlpage. That was my question. Its working, but it isn't nice for the client.
     
Loading...

Share This Page