Daily Archives: December 27, 2019

wordpress installation issues

Mysql connection issue. If there is always connection issue. Try update mysql password with mysql_native_password keyword.

ALTER USER root@localhost identified with mysql_native_password by 'your_password';

‘Invalid default value’ = database install fail error

It is because php is too strict to allow the script to run.
vim /etc/my.cnf

Add below:


Unable to install plugin. Add below into wp-config.php

define( 'FS_METHOD', 'direct' );

There might be plugin installation issue. So to me, just chmod 777 on wp-content folder:

chmod -R 777 wp-content

Other useful mysql command.

Completely delete wordpress tables

drop table wp_commentmeta, wp_options, wp_postmeta, wp_term_relationships, wp_term_taxonomy, wp_terms, wp_usermeta;
GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost';

Script testing mysql connection

            $mysqli = new mysqli('localhost', 'username', 'password', 'dbname');

    /* check connection */
if ($mysqli->connect_errno) {
        printf("Connect failed: %s\n", $mysqli->connect_error);

    /* check if server is alive */
if ($mysqli->ping()) {
        printf ("Our connection is ok!\n");
    } else {
        printf ("Error: %s\n", $mysqli->error);

    /* close connection */
Category: web