getting database errors - advice greatly appreciated

Am new to database handling also dealing with debug.log

Currently straight after wp-login obvious I experience a few db issues, see attached debug file. Your advice how to deal with each of those errors would be awesome.
Thank you in advance.
Steven

  • Rupok

    Hi Steven

    Hope you had a wonderful day.

    It was a know bug for WordPress 4.2.1 but this was fixed long ago. Are you using the latest version of WordPress?

    Can you open your wp-config.php file from your root directory and check if there is any "DB_CHARSET" defined? If not, can you add the following line in your wp-config.php , save and check if the issue is still there? I think it will be gone.
    define('DB_CHARSET', 'utf8');

    Please let us know the result.

    Have a nice day. Cheers!
    Rupok

  • Madhusudan

    Hello Steven Zimmerman ,
    It looks like your host is using MySql version less than 5.5.3, that's the reason why it's not supporting utf8mb4 charset.

    To solve the issue on wp-config.php file try to change:
    define('DB_CHARSET', 'utf8mb4');
    to
    define('DB_CHARSET', 'utf8');
    Here is a good article on checking which version of mysql is on your server:
    http://webriti.com/how-to-check-for-php-and-mysql-version-using-wordpress/

    However this is the temporary fix only, you should update your MySQL versions to 5.5.3 or later because utf8 doesn't support the entire UTF character set properly, only utf8mb4 does. By using utf8 you are arbitrarily limiting the set of symbols that can be used in your database that means you are going to lose data every time a user enters an astral symbol as part of a comment or message and anything you insert to store in your database.

    Thanking you,
    Madhusudan

  • Steven Zimmerman

    Hello Madhusudan,

    thank you for quick response and advise. Followed the step as suggest, installed Health Check. This is the result:
    Your server is running PHP version 5.5.34 and MySQL version 5.6.30.

    Next: Contacted provider asking for upgrading but they need to know exactly which version to use.
    Now, please help to clarify and advise which version to choose from for the update

    - Current Stable PHP 7.0.6
    - Current Stable PHP 5.6.21

    Which MySQL version to choose

    - MySQL Enterprise Edition (commercial) MySQL Enterprise Edition includes the most comprehensive set of advanced features and management tools for MySQL.

    - MySQL Cluster CGE (commercial) MySQL Cluster is a real-time, transactional database designed for fast, always-on access to data under high throughput conditions.

    Finally please explain the effect to existing with upgrading. In short can I expect that our existing db's run smoothly?

    After the upgrade do I still have to modify wp-config.php to UTF8 because originally are created with that UTF8 level.

    Thanks
    Steven

    ?

  • Madhusudan

    Hello Steven Zimmerman ,
    WordPress 4.5 stopped suppressing warnings from the database system that's why you're seeing the errors. Fixing the underlying problem will fix the issue.

    which php version to choose from for the update?

    -> I recommend you selecting the latest version of PHP available to you. That would be PHP PHP 7.0. 6 . Using a newer PHP would make your website run faster.

    Which MySQL version to choose?

    -> It depends upon upon the purpose of your website. If your website is suppose to get heavy traffic you might opt to choose MySQL Cluster CGE.

    Finally please explain the effect to existing with upgrading. In short can I expect that our existing db's run smoothly?

    -> If you are up to date, you shouldn't have much of an issue. Also create backups of entire production servers but while time consuming, its the only safe solution. The database should continue to work but needs to be tested.

    After the upgrade do I still have to modify wp-config.php to UTF8 because originally are created with that UTF8 level.

    -> You mightn't need to modify to UTF8. That's the point of upgrading to the latest versions.

    Let us know how it works.

    Thanking you,
    Madhusudan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.