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.

Database error

Discussion in 'Database Discussions' started by deepy, Nov 14, 2016.

Tags:
  1. deepy

    deepy Registered

    Joined:
    Nov 14, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    dubai
    cPanel Access Level:
    Website Owner
    Hi

    I am experiencing serious problem on my website. My website is down due to "database error"

    I have checked the server status and showing the below error message

    /dev/sda7 /var 100% (133,757,300 of 140,980,692)


    Also mySQL databse from cPanel showing " MySQL server currently offline" See the attached error message.

    Kindly help me to fix the issue

    regards
    dp
     

    Attached Files:

  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    569
    Likes Received:
    40
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Your /var partition is 100% full and because of that MySQL service is done on the server. If you have free space on your another partition (/home) then you can move your MySQL directory to your /home partition

    1. Take a full backup of your all database.

    Code:
    mysqldump --all-databases | gzip > /home/alldatabases.sql.gz
    
    2. Disable MySQL service through WHM > Service Manager for MySQL and save the area, So that monitor service will not start MySQL service while moving MySQL directory to other partition

    3. Stop MySQL service
    Code:
    /etc/init.d/mysql stop
    4. Move your MySQL directory to /home and with following command.
    Code:
    mkdir /home/var_mysql
    mv /var/lib/mysql /home/var_mysql
    chown -R mysql:mysql /home/var_mysql/mysql
    ln -s /home/var_mysql/mysql /var/lib/mysql
    /etc/init.d/mysql start
    5. Enable MySQL service through WHM > Service Manager
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page