• Skip to main content
  • Skip to primary sidebar

Code Inherit

Simple Programming Code Examples

MySQL

Create hundreds of WordPress Users using SQL query manually

18th January 2021 by Site Admin Leave a Comment

="INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES ("&A4&", '"&B4&"', MD5('"&E4&"'), '"&LOWER(B4)&"', '"&LOWER(B4)&"@gmail.com', '', '2021-01-018 11:33:20', '1609932803:$P$B7LBiFY6NR6NrXFrSCrO7/54DqNi8B/', 0, '"&C4&"');"
 
="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'nickname', '"&B4&"');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'first_name', '"&C4&"');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'last_name', '');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'description', '');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'rich_editing', 'true');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'syntax_highlighting', 'true');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'comment_shortcuts', 'false');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'admin_color', 'fresh');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'use_ssl', '0');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'show_admin_bar_front', 'true');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'locale', '');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'wp_capabilities', 'a:1:{s:10:\""subscriber\"";b:1;}');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'wp_user_level', '0');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'um_multiple_roles', 'a:2:{i:0;s:23:\""um_erlms-entry-operator\"";i:1;s:14:\""um_data-viewer\"";}');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'um_user_profile_url_slug_user_login', '"&B4&"');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'account_status', 'approved');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'sw_pwd', '"&E4&"');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'dismissed_wp_pointers', 'wp496_privacy');"
 ="INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES("&A4&", 'synced_gravatar_hashed_id', '354fbe8cea21bca9871847af17cb1970');"

="INSERT INTO t_site_user_map (UserId, InstanceId, IsActive) VALUES('"&A4&"', 1580086744006, 1);"

mysql -u root -p erlms_drc_test_db < D:\erlmsdrc\INSERT_INTO_wp_users.sql
mysql -u root -p erlms_drc_test_db < D:\erlmsdrc\INSERT_INTO_wp_usermeta.sql
mysql -u root -p erlms_drc_test_db < D:\erlmsdrc\INSERT_INTO_t_site_user_map.sql

mysql -u infomedr_dbadmin '-pDdFxDkuFRdf8Kdp' infomedr_erlms_master < /home/infomedrdc/public_html/INSERT_USER_WP_MANUALLY/INSERT_INTO_wp_users.sql mysql -u infomedr_dbadmin '-pDdFxDkuFRdf8Kdp' infomedr_erlms_master < /home/infomedrdc/public_html/INSERT_USER_WP_MANUALLY/INSERT_INTO_wp_usermeta.sql
 mysql -u infomedr_dbadmin '-pDdFxDkuFRdf8Kdp' infomedr_erlms_master < /home/infomedrdc/public_html/INSERT_USER_WP_MANUALLY/INSERT_INTO_t_site_user_map.sql
ERLMS_Facility_List_Insert_V1Download
INSERT_WP_USER_MANUALLYDownload

Filed Under: MySQL, Uncategorised, Wordpress, WP

InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files

12th October 2020 by Site Admin Leave a Comment

2020-10-12 15:12:52 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

I have faced the same problem. I just followed the below steps

Step 1: Moved(cut/paste) all the files in C:\xampp\mysql\data to desired backup location.

Step 2: After that copied all the files from C:\xampp\mysql\backup to C:\xampp\mysql\data

Step 3: Restarted mysql and checked the phpmyadmin url, it worked.

Step 4: After that stopped mysql that copied ibdata1 file from backup location to C:\xampp\mysql\data

Step 5: Restarted mysql

Step 6: After that copied all database folders and checked all the tables, It worked.

Filed Under: MySQL

How to create MySQL user and database

23rd September 2020 by Site Admin Leave a Comment

CREATE DATABASE erlms_site1_db CHARACTER SET utf8 COLLATE utf8_general_ci
GRANT ALL privileges on erlms_site1_db.* to ‘benin_mysqladmin’@’localhost’ with grant option;
FLUSH PRIVILEGES;

Filed Under: MySQL, Uncategorised

Primary Sidebar

Recent Posts

  • Bijoy Converter
  • How to amend previous commit with current changes in git and github?
  • How to install PHP 8.1 alongside PHP 7.4 using HomeBrew in MacOs?
  • Create a shell script to switch 7.4 to 8.1 and vice versa
  • How to reflect PHP8.1 to Apache in MacOS?

Recent Comments

    Archives

    • October 2025
    • September 2024
    • January 2024
    • July 2023
    • October 2021
    • September 2021
    • February 2021
    • January 2021
    • October 2020
    • September 2020
    • August 2020
    • May 2020
    • March 2020
    • February 2020
    • January 2020
    • November 2019
    • May 2019

    Categories

    • Couchbase
    • Cron Job
    • dhis2
    • Linux, MySQL
    • MySQL
    • Oracle
    • Oracle Client
    • PHP
    • SSL
    • Subdomain
    • Uncategorised
    • Wordpress
    • WP
    • Zip

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in