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.

Disalbe MySQL for a domain

Discussion in 'General Discussion' started by Kailash1, Jun 21, 2007.

  1. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    Is it possible to disable the MySQL service for a domain?

    Thanks,

    Kailash
     
    #1 Kailash1, Jun 21, 2007
    Last edited: Jun 22, 2007
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can set the number of SQL databases permitted for that domain to 0, in effect preventing them from using MySQL.
     
  3. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    I do not want to disable the MySQL resource permanently. I just want to disable it for temporary. There are already several database created under the domain.

    Thanks,

    Kailash
     
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Kailash,
    One thing you could do is change the passwords for the mysql users on this domain to be something else. That way they will merely get access denied, then in the package set them down to 0 to prevent them creating any new users.

    for example:
    mysql
    > UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='username';
    > FLUSH PRIVILEGES;
    > exit
     
  5. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    How about setting the /var/lib/mysql/username to 0000
    That would prevent any activity, then change back to 0700 as needed.
     
  6. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    I will try.
     
  7. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Perhaps I should be more clear. By "setting" I mean permissions to 0000 not the directory name.

    cheers
     
Loading...

Share This Page