Join the community today
Become a Member

MariaDB Wordpress Database Error

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by emre22, Feb 13, 2017.

  1. emre22

    emre22 Member

    42
    5
    8
    Oct 15, 2016
    Ratings:
    +5
    Local Time:
    8:50 AM
    nginx-1.10.1
    MariaDB 10
    Hello,

    I woke up today with a database error, well first I saw a error 500, I tried nprestart, didnt fix, after that I went for a reboot. and now I receive a database error. trying to restart mysql.

    # service mysql restart
    ERROR! MySQL server PID file could not be found!
    Starting MySQL.170213 05:20:51 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
    170213 05:20:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    ... ERROR!
    ERROR! Failed to restart server.


    I am on the beta edition. How should I continue?
     
  2. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +161
    Local Time:
    2:50 PM
    latest
    latest
    Happened to me yesterday. The vps that I was on locked up and had to be rebooted, fsck by the provider. It somehow corrupted my database.

    I couldn't start/restart MariaDB. I had to uninstall MariaDB, rename /var/lib/mysql, reinstall and restore my db backup. After every site was up and running again. A few hours later I transferred all my stuff to a different server.
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,162
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:50 PM
    Nginx 1.13.x
    MariaDB 5.5
    Who's your web host and plan for server ?

    CentOS 6 or 7 ? centmin mod 123.09beta01 or 123.08stable ? last time you updated centmin mod via centmin.sh menu option 23 ? and re-ran centmin.sh ?

    If on CentOS 6 and haven't updated in ages one possibility is running into https://community.centminmod.com/th...or-mariadb-10-0-29-10-1-21-on-centos-6.10090/

    You can check your mysql error log which is listed along with all other log file locations as per How to troubleshoot Centmin Mod initial install issues (/var/log/mysqld.log) for clues.

    Which web host ? plan ?

    You don't need to uninstall MariaDB in that case, you can just backup all mysql data on server for all databases and system db and move /var/lib/mysql aside and use mysql_install_db to repopulate /var/lib/mysql and then restore mysql data to new /var/lib/mysql refreshed directory see https://community.centminmod.com/th...to-reset-your-mysql-database-directory.10001/
     
    • Like Like x 1
    • Informative Informative x 1
  4. emre22

    emre22 Member

    42
    5
    8
    Oct 15, 2016
    Ratings:
    +5
    Local Time:
    8:50 AM
    nginx-1.10.1
    MariaDB 10
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,162
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:50 PM
    Nginx 1.13.x
    MariaDB 5.5
    strange there's no way on centos 6 for /var/log/mysqld.log to be empty also check /var/lib/mysql/yourhostname.err error log and post contents of your /etc/my.cnf mysql settings file

    Might want to use CODE tags for code How to use forum BBCODE code tags :)
     
    • Like Like x 1
  6. emre22

    emre22 Member

    42
    5
    8
    Oct 15, 2016
    Ratings:
    +5
    Local Time:
    8:50 AM
    nginx-1.10.1
    MariaDB 10
    the host created much more trouble so I moved on and works now. ;)
     
    • Like Like x 1