Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

How can Optimize one Databases

Discussion in 'Database Discussions' started by Nirjonadda, Dec 14, 2017.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    560
    Likes Received:
    14
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Please let me know that How can Optimize/repair one Databases, not all database?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,731
    Likes Received:
    78
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    What is the error that you are facing? Can you give us more information here, so we can take a look and check if that can be solved with guideliness and discussion or will require direct assistance.
     
  3. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    560
    Likes Received:
    14
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I like to Optimize one Databases, We can run an optimize for all databases with this command but not one database.

    Code:
    mysqlcheck -u root --auto-repair --optimize --all-databases
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You would simply replace the "--all-databases" part of that command with the actual database name. EX:

    Code:
    mysqlcheck --optimize database_name
    Thank you.
     
    Nirjonadda likes this.
  5. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    560
    Likes Received:
    14
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Also can be add repair? Is this command correct?

    Code:
    mysqlcheck -u root --auto-repair --optimize database_name
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can add in additional flags such as "--auto-repair" if you prefer and understand the purpose of doing so.

    Thank you.
     
    Nirjonadda likes this.
Loading...

Share This Page