Welcome to Centmin Mod Community
Become a Member

Wordpress Can't create user

Discussion in 'Blogs & CMS usage' started by Jon Snow, Jul 4, 2017.

  1. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    2:05 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I no longer have access to the old server but I do have the sql backup on my computer. Should I make a new database and import the data? I use your addon to make databases - mysqladmin_shell.sh Shell based Addon

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:05 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    yes import that backup into a new database i.e. called oldwpdb

    then you can check out the mysql table structure of database = oldwpdb using my mysqlmymonlite.sh tool outlined at mysqlmymonlite.sh Addon

    1. install mysqlmymonlite.sh
    Code (Text):
    mkdir -p /root/tools; cd /root/tools; rm -rf /root/mysqltuner.pl; rm -rf mysqlmymonlite.sh; wget http://mysqlmymon.com/download/mysqlmymonlite.zip; unzip -o mysqlmymonlite.zip; mv centos/mysqlmymonlite.sh .; rm -rf mysqlmymonlite.zip centos centos_whm debian changelog*; chmod +x mysqlmymonlite.sh
    


    2. check that it's installed
    run
    Code (Text):
    /root/tools/mysqlmymonlite.sh
    

    output would be
    Code (Text):
    /root/tools/mysqlmymonlite.sh
    please see help for all options available
    ./mysqlmymonlite.sh --help
    
    install mysqlmymonlite.sh at /root
    chmod +x mysqlmymonlite.sh
    
    ./mysqlmymonlite.sh --help
    ./mysqlmymonlite.sh check
    ./mysqlmymonlite.sh run
    ./mysqlmymonlite.sh mysql
    ./mysqlmymonlite.sh vmstat
    ./mysqlmymonlite.sh showcreate
    ./mysqlmymonlite.sh showindex
    ./mysqlmymonlite.sh vbshowtables
    ./mysqlmymonlite.sh dblist
    ./mysqlmymonlite.sh mysqlreport
    ./mysqlmymonlite.sh mysqlfullreport
    ./mysqlmymonlite.sh mysqltuner
    ./mysqlmymonlite.sh psmem
    ./mysqlmymonlite.sh pschema
    


    3. use the showcreate option to list each oldwpdb database's table structure
    Code (Text):
    /root/tools/mysqlmymonlite.sh showcreate
    

    example when prompted enter database name you want to check out the tables for, then answer y to display tables schema but answer n to save to files.
    Code (Text):
    /root/tools/mysqlmymonlite.sh showcreate
    
    What is your mysql database name ? oldwpdb
    
    Do you want to display all oldwpdb tables schema (how table was created) ? [y/n]y
    
    Do you want save output to text file ? Answering no will output only to screen. [y/n]n
    

    it will then proceed to list all wordpress database = oldwpdb's database table structures
    Code (Text):
    *************************** 1. row ***************************
           Table: 17842_commentmeta
    Create Table: CREATE TABLE `17842_commentmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_ci,
      PRIMARY KEY (`meta_id`),
      KEY `comment_id` (`comment_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_comments
    Create Table: CREATE TABLE `17842_comments` (
      `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0',
      `comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
      `comment_author_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_author_url` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_author_IP` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `comment_content` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `comment_karma` int(11) NOT NULL DEFAULT '0',
      `comment_approved` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
      `comment_agent` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`comment_ID`),
      KEY `comment_post_ID` (`comment_post_ID`),
      KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),
      KEY `comment_date_gmt` (`comment_date_gmt`),
      KEY `comment_parent` (`comment_parent`),
      KEY `comment_author_email` (`comment_author_email`(10))
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_links
    Create Table: CREATE TABLE `17842_links` (
      `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `link_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_target` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_visible` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Y',
      `link_owner` bigint(20) unsigned NOT NULL DEFAULT '1',
      `link_rating` int(11) NOT NULL DEFAULT '0',
      `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `link_rel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `link_notes` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `link_rss` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      PRIMARY KEY (`link_id`),
      KEY `link_visible` (`link_visible`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_options
    Create Table: CREATE TABLE `17842_options` (
      `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `option_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `option_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `autoload` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'yes',
      PRIMARY KEY (`option_id`),
      UNIQUE KEY `option_name` (`option_name`),
      KEY `autoload_idx` (`autoload`)
    ) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_postmeta
    Create Table: CREATE TABLE `17842_postmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `post_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_ci,
      PRIMARY KEY (`meta_id`),
      KEY `post_id` (`post_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_posts
    Create Table: CREATE TABLE `17842_posts` (
      `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `post_author` bigint(20) unsigned NOT NULL DEFAULT '0',
      `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `post_title` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `post_excerpt` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `post_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'publish',
      `comment_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
      `ping_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
      `post_password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `post_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `to_ping` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `pinged` text COLLATE utf8mb4_unicode_ci NOT NULL,
      `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_content_filtered` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `guid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `menu_order` int(11) NOT NULL DEFAULT '0',
      `post_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'post',
      `post_mime_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `comment_count` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`ID`),
      KEY `post_name` (`post_name`(191)),
      KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
      KEY `post_parent` (`post_parent`),
      KEY `post_author` (`post_author`)
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_term_relationships
    Create Table: CREATE TABLE `17842_term_relationships` (
      `object_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `term_order` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`object_id`,`term_taxonomy_id`),
      KEY `term_taxonomy_id` (`term_taxonomy_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_term_taxonomy
    Create Table: CREATE TABLE `17842_term_taxonomy` (
      `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `taxonomy` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `count` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`term_taxonomy_id`),
      UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`),
      KEY `taxonomy` (`taxonomy`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_termmeta
    Create Table: CREATE TABLE `17842_termmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_ci,
      PRIMARY KEY (`meta_id`),
      KEY `term_id` (`term_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_terms
    Create Table: CREATE TABLE `17842_terms` (
      `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `slug` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `term_group` bigint(10) NOT NULL DEFAULT '0',
      PRIMARY KEY (`term_id`),
      KEY `slug` (`slug`(191)),
      KEY `name` (`name`(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_usermeta
    Create Table: CREATE TABLE `17842_usermeta` (
      `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_ci,
      PRIMARY KEY (`umeta_id`),
      KEY `user_id` (`user_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    *************************** 1. row ***************************
           Table: 17842_users
    Create Table: CREATE TABLE `17842_users` (
      `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_login` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_pass` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_nicename` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `user_activation_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_status` int(11) NOT NULL DEFAULT '0',
      `display_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      PRIMARY KEY (`ID`),
      KEY `user_login_key` (`user_login`),
      KEY `user_nicename` (`user_nicename`),
      KEY `user_email` (`user_email`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    

    from WordPress log in redirect loop - Spigot Design, common tables with issues would be wp_usermeta, wp_term_taxonomy and wp_users so check those out specifically

    on my below example, centmin.sh menu option 22 created wordpress installs have a random table prefix for added security

    so for 17842_usermeta table, you can see umeta_id has AUTO_INCREMENT field
    Code (Text):
    *************************** 1. row ***************************
           Table: 17842_usermeta
    Create Table: CREATE TABLE `17842_usermeta` (
      `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_ci,
      PRIMARY KEY (`umeta_id`),
      KEY `user_id` (`user_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    

    for 17842_users table, you can see ID has AUTO_INCREMENT field
    Code (Text):
    *************************** 1. row ***************************
           Table: 17842_users
    Create Table: CREATE TABLE `17842_users` (
      `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_login` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_pass` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_nicename` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `user_activation_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `user_status` int(11) NOT NULL DEFAULT '0',
      `display_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      PRIMARY KEY (`ID`),
      KEY `user_login_key` (`user_login`),
      KEY `user_nicename` (`user_nicename`),
      KEY `user_email` (`user_email`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    

    for 17842_term_taxonomy, term_taxonomy_id has AUTO_INCREMENT field
    Code (Text):
    *************************** 1. row ***************************
           Table: 17842_term_taxonomy
    Create Table: CREATE TABLE `17842_term_taxonomy` (
      `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `taxonomy` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
      `parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `count` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`term_taxonomy_id`),
      UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`),
      KEY `taxonomy` (`taxonomy`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    

    you can use mysqlmymonlite.sh showcreate to get both your oldwpdb and the current messed up database name's table structures and save into 2 separate text files. Then use a file diff comparison tool, you can visually see any differences between oldwpdb and current messed up database's table structures :)

    You can also use mysqlshow command to see an overview of wp database's tables and auto_increment values i.e.
    Code (Text):
    mysqlshow -i oldwpdb
    Database: oldwpdb
    +--------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
    | Name                     | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation          | Checksum | Create_options | Comment |
    +--------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
    | 17842_commentmeta        | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 32768        | 0         | 1              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_comments           | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 81920        | 0         | 2              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_links              | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 16384        | 0         | 1              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_options            | InnoDB | 10      | Compact    | 117  | 280            | 32768       | 0               | 32768        | 0         | 128            | 2017-07-05 04:57:08 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_postmeta           | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 32768        | 0         | 2              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_posts              | InnoDB | 10      | Compact    | 2    | 8192           | 16384       | 0               | 65536        | 0         | 3              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_term_relationships | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 16384        | 0         |                | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_term_taxonomy      | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 32768        | 0         | 2              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_termmeta           | InnoDB | 10      | Compact    | 0    | 0              | 16384       | 0               | 32768        | 0         | 1              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_terms              | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 32768        | 0         | 2              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_usermeta           | InnoDB | 10      | Compact    | 14   | 1170           | 16384       | 0               | 32768        | 0         | 15             | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    | 17842_users              | InnoDB | 10      | Compact    | 1    | 16384          | 16384       | 0               | 49152        | 0         | 2              | 2017-07-05 04:57:07 |             |            | utf8mb4_unicode_ci |          |                |         |
    +--------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
    

    check the list of wp username's in 17842_users table in oldwpdb database name
    Code (Text):
    mysql -e "select ID, user_login from 17842_users;" oldwpdb
    

    Code (Text):
    mysql -e "select ID, user_login from 17842_users;" oldwpdb
    +--------+------------------------------------+
    | ID     | user_login                         |
    +--------+------------------------------------+
    | 167555 | zVHKfLzGTuO3ggkz6YYlFAVv5NAwp19929 |
    +--------+------------------------------------+
    

    default wp installs usually us ID = 1, but centmin.sh menu option 22 wordpress auto installs for added security change the default wp admin user ID to a random number :)
     
    Last edited: Jul 5, 2017
  3. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    2:05 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    This is the result of the new import :
    Code (Text):
    *************************** 1. row ***************************
           Table: wp_commentmeta
    Create Table: CREATE TABLE `wp_commentmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) DEFAULT NULL,
      `meta_value` longtext,
      PRIMARY KEY (`meta_id`),
      KEY `comment_id` (`comment_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_comments
    Create Table: CREATE TABLE `wp_comments` (
      `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0',
      `comment_author` tinytext NOT NULL,
      `comment_author_email` varchar(100) NOT NULL DEFAULT '',
      `comment_author_url` varchar(200) NOT NULL DEFAULT '',
      `comment_author_IP` varchar(100) NOT NULL DEFAULT '',
      `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `comment_content` text NOT NULL,
      `comment_karma` int(11) NOT NULL DEFAULT '0',
      `comment_approved` varchar(20) NOT NULL DEFAULT '1',
      `comment_agent` varchar(255) NOT NULL DEFAULT '',
      `comment_type` varchar(20) NOT NULL DEFAULT '',
      `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`comment_ID`),
      KEY `comment_post_ID` (`comment_post_ID`),
      KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),
      KEY `comment_date_gmt` (`comment_date_gmt`),
      KEY `comment_parent` (`comment_parent`),
      KEY `comment_author_email` (`comment_author_email`(10))
    ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_links
    Create Table: CREATE TABLE `wp_links` (
      `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `link_url` varchar(255) NOT NULL DEFAULT '',
      `link_name` varchar(255) NOT NULL DEFAULT '',
      `link_image` varchar(255) NOT NULL DEFAULT '',
      `link_target` varchar(25) NOT NULL DEFAULT '',
      `link_description` varchar(255) NOT NULL DEFAULT '',
      `link_visible` varchar(20) NOT NULL DEFAULT 'Y',
      `link_owner` bigint(20) unsigned NOT NULL DEFAULT '1',
      `link_rating` int(11) NOT NULL DEFAULT '0',
      `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `link_rel` varchar(255) NOT NULL DEFAULT '',
      `link_notes` mediumtext NOT NULL,
      `link_rss` varchar(255) NOT NULL DEFAULT '',
      PRIMARY KEY (`link_id`),
      KEY `link_visible` (`link_visible`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_options
    Create Table: CREATE TABLE `wp_options` (
      `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `option_name` varchar(191) DEFAULT NULL,
      `option_value` longtext NOT NULL,
      `autoload` varchar(20) NOT NULL DEFAULT 'yes',
      PRIMARY KEY (`option_id`),
      UNIQUE KEY `option_name` (`option_name`)
    ) ENGINE=MyISAM AUTO_INCREMENT=96055 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_postmeta
    Create Table: CREATE TABLE `wp_postmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `post_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) DEFAULT NULL,
      `meta_value` longtext,
      PRIMARY KEY (`meta_id`),
      KEY `post_id` (`post_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=30378 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_posts
    Create Table: CREATE TABLE `wp_posts` (
      `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `post_author` bigint(20) unsigned NOT NULL DEFAULT '0',
      `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_content` longtext NOT NULL,
      `post_title` text NOT NULL,
      `post_excerpt` text NOT NULL,
      `post_status` varchar(20) NOT NULL DEFAULT 'publish',
      `comment_status` varchar(20) NOT NULL DEFAULT 'open',
      `ping_status` varchar(20) NOT NULL DEFAULT 'open',
      `post_password` varchar(255) NOT NULL DEFAULT '',
      `post_name` varchar(200) NOT NULL DEFAULT '',
      `to_ping` text NOT NULL,
      `pinged` text NOT NULL,
      `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `post_content_filtered` longtext NOT NULL,
      `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `guid` varchar(255) NOT NULL DEFAULT '',
      `menu_order` int(11) NOT NULL DEFAULT '0',
      `post_type` varchar(20) NOT NULL DEFAULT 'post',
      `post_mime_type` varchar(100) NOT NULL DEFAULT '',
      `comment_count` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`ID`),
      KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
      KEY `post_parent` (`post_parent`),
      KEY `post_author` (`post_author`),
      KEY `post_name` (`post_name`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=17976 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_term_relationships
    Create Table: CREATE TABLE `wp_term_relationships` (
      `object_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `term_order` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`object_id`,`term_taxonomy_id`),
      KEY `term_taxonomy_id` (`term_taxonomy_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_term_taxonomy
    Create Table: CREATE TABLE `wp_term_taxonomy` (
      `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `taxonomy` varchar(32) NOT NULL DEFAULT '',
      `description` longtext NOT NULL,
      `parent` bigint(20) unsigned NOT NULL DEFAULT '0',
      `count` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`term_taxonomy_id`),
      UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`),
      KEY `taxonomy` (`taxonomy`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2450 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_termmeta
    Create Table: CREATE TABLE `wp_termmeta` (
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) DEFAULT NULL,
      `meta_value` longtext,
      PRIMARY KEY (`meta_id`),
      KEY `term_id` (`term_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_terms
    Create Table: CREATE TABLE `wp_terms` (
      `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(200) NOT NULL DEFAULT '',
      `slug` varchar(200) NOT NULL DEFAULT '',
      `term_group` bigint(10) NOT NULL DEFAULT '0',
      PRIMARY KEY (`term_id`),
      KEY `slug` (`slug`(191)),
      KEY `name` (`name`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=2450 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_usermeta
    Create Table: CREATE TABLE `wp_usermeta` (
      `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) DEFAULT NULL,
      `meta_value` longtext,
      PRIMARY KEY (`umeta_id`),
      KEY `user_id` (`user_id`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=1665 DEFAULT CHARSET=utf8
    *************************** 1. row ***************************
           Table: wp_users
    Create Table: CREATE TABLE `wp_users` (
      `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `user_login` varchar(60) NOT NULL DEFAULT '',
      `user_pass` varchar(255) NOT NULL DEFAULT '',
      `user_nicename` varchar(50) NOT NULL DEFAULT '',
      `user_email` varchar(100) NOT NULL DEFAULT '',
      `user_url` varchar(100) NOT NULL DEFAULT '',
      `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `user_activation_key` varchar(255) NOT NULL DEFAULT '',
      `user_status` int(11) NOT NULL DEFAULT '0',
      `display_name` varchar(250) NOT NULL DEFAULT '',
      PRIMARY KEY (`ID`),
      KEY `user_login_key` (`user_login`),
      KEY `user_nicename` (`user_nicename`),
      KEY `user_email` (`user_email`)
    ) ENGINE=MyISAM AUTO_INCREMENT=50 DEFAULT CHARSET=utf8
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:05 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    that looks complete with all the AUTO_INCREMENT in place. Try switching wp-config.php to that newly imported database name
     
  5. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    2:05 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    All good now. Thanks!
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:05 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    glad to hear :)

    strange how you must of lost some auto_increment fields in the other database import heh
     
  7. Mikalandjelo

    Mikalandjelo New Member

    2
    0
    1
    May 6, 2019
    Serbia, Belgrade
    Ratings:
    +0
    Local Time:
    7:05 AM
    That help me to all good now. Thanks!
    ----------------------------------------------
    maintaining websites