Title: New install seeing error&#8230; ?
Last modified: March 20, 2018

---

# New install seeing error… ?

 *  Resolved [ampapa](https://wordpress.org/support/users/ampapa/)
 * (@ampapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/)
 * I’m seeing the following messages after install, is this normal? or is thre really
   an install problem.. thanks
 * IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/
   class-ip-geo-block-logs.php (133) Table ‘hostname_host.wp_ip_geo_block_cache’
   doesn’t exist
 * IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/
   class-ip-geo-block-logs.php (837) Table ‘hostname_host.wp_ip_geo_block_cache’
   doesn’t exist
 * IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/
   class-ip-geo-block-logs.php (210) Table ‘hostname_host.wp_ip_geo_block_stat’ 
   doesn’t exist

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10097176)
 * Hi [@ampapa](https://wordpress.org/support/users/ampapa/),
 * > is this normal?
 * Unfortunately, No. Creating new tables in your database was failed on activation.
   Please try followings:
 * 1. Check the capacity of your database. If it is full, creating the DB table 
   may be failed.
 * 2. Once deactivate this plugin and re-activate again to try creating tables again.
 * 3. Add one line `define( 'IP_GEO_BLOCK_DEBUG', true );` into your “wp-config.
   php”. You can find the following option in “Plugin settings” section:
 * ![](https://i0.wp.com/user-images.githubusercontent.com/828814/37688574-1d84e1ea-
   2ce4-11e8-812e-07a9106711f0.png?ssl=1)
 * Then try to “Create now” button. If you find fail message, I think this issue
   would be caused by your database system.
 * I appreciate you if you let me know the result.
    Thanks for your cooperation.
 *  Thread Starter [ampapa](https://wordpress.org/support/users/ampapa/)
 * (@ampapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10098518)
 * The DB size is 8.77MB so I don’t think its a sizing issue.
 * Still not a working solution, from the debug info window:
 * – Server: Apache
    – PHP: 7.0.22 – PHP SAPI: cgi-fcgi – WordPress: 4.9.4 – Multisite:
   no – File system: direct – Temp folder: /tmp/ – Umask: 755 – Zlib: yes – ZipArchive:
   yes – PECL phar: yes – BC Math: yes – mb_strcut: yes – SQLite(PDO): yes – DNS
   lookup: available [2412.1 msec] – User agent: Mozilla/5.0 (Windows NT 10.0; Win64;
   x64; rv:59.0) Gecko/20100101 Firefox/59.0 – Customizr 3.2.10 – Antispam Bee 2.7.1–
   Enhanced Media Library 2.5 – IP Geo Block 3.0.9 – iThemes Security 6.9.2 – UpdraftPlus–
   Backup/Restore 1.14.4 – Wordfence Security 7.1.1 – YouTube 11.8.6.1
 *  Thread Starter [ampapa](https://wordpress.org/support/users/ampapa/)
 * (@ampapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10098531)
 * Can I manually pre-seed the tables?
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10099302)
 * Hi [@ampapa](https://wordpress.org/support/users/ampapa/),
 * Unfortunately, I don’t have any idea why the tables could not be created.
 * One possible solution would be to use [`dbDelta()`](https://codex.wordpress.org/Creating_Tables_with_Plugins#Create_Database_Tables).
   In this plugin, `$wpdb->query()` is directly called on creating table.
 * > Can I manually pre-seed the tables?
 * Well, I can send you SQL for creating `PREFIX_ip_geo_block_cache` and `PREFIX_ip_geo_block_stat`
   by email if you send me an email to tokkonopapa at yahoo dot com.
 * And one more table `PREFIX_ip_geo_block_logs` is needed. So would you check if
   it exists using phpMyAdmin?
 * For my side, I’ll test using `dbDelta()`.
 * So much appreciated your cooperation!
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10099313)
 * I’d like to ask you one more thing.
 * Would you let me know what type of database software is used on your host and
   also its version. I hope it may be mySQL.
 * Thanks!
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10459232)
 * Hi [@tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)!!
 * Look, I have almost the same error as OP after reactivation:
 * IP Geo Block: /home/myacct/public_html/wp-content/plugins/ip-geo-block/classes/
   class-ip-geo-block-logs.php (893) Table ‘myacct_mydbprefix.mydb_ip_geo_block_cache’
   doesn’t exist
    IP Geo Block: /home/myacct/public_html/wp-content/plugins/ip-geo-
   block/classes/class-ip-geo-block-logs.php (938) Table ‘myacct_mydbprefix.mydb_ip_geo_block_cache’
   doesn’t exist
 * I have gone through a number of steps with no relief.
 * Please let me know if you prefer I start my own topic, or continue here.
 * Thanks
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10462523)
 * Hi [@gastronimo](https://wordpress.org/support/users/gastronimo/),
 * > Please let me know if you prefer I start my own topic, or continue here.
 * You are OK if you have the same issue at the first installation.
 * Actually, [@ampapa](https://wordpress.org/support/users/ampapa/) made data tables
   manually using phpMyAdmin.
 * I improved the code based on his information, but I might be failed.
 * If you adopt mySQL and you have enough skill to make a table manually, please
   try the following SQL:
 *     ```
       CREATE TABLE your_prefix_ip_geo_block_cache(
           `No` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
           `time` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `hook` VARCHAR(8) NOT NULL,
           `ip` VARBINARY(96) UNIQUE NOT NULL,
           `asn` VARCHAR(8) NULL,
           `code` VARCHAR(2) NOT NULL DEFAULT 'ZZ',
           `auth` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `fail` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `call` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `last` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `view` INT(10) UNSIGNED NOT NULL DEFAULT 0,
           `host` VARBINARY(512) NULL,
           PRIMARY KEY(`No`)
       ) CHARACTER SET utf8
       ```
   
 * I already tested it on mySQL. If you adopt MariaDB, please wait until I finish
   to test the above SQL on MariaDB.
 * I’m sorry for your inconvenience.
    -  This reply was modified 7 years, 10 months ago by [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/).
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10467687)
 * Gracias!
 * so far, when I enter (using my real DB ID)
 *  SQL query:
 * CREATE TABLE my_prefix_ip_geo_block_cache(
    `No` BIGINT(20) UNSIGNED NOT NULL
   AUTO_INCREMENT, `time` INT(10) UNSIGNED NOT NULL DEFAULT 0, `hook` VARCHAR(8)
   NOT NULL, `ip` VARBINARY(96) UNIQUE NOT NULL, `asn` VARCHAR(8) NULL, `code` VARCHAR(
   2) NOT NULL DEFAULT ‘ZZ’, `auth` INT(10) UNSIGNED NOT NULL DEFAULT 0, `fail` 
   INT(10) UNSIGNED NOT NULL DEFAULT 0, `call` INT(10) UNSIGNED NOT NULL DEFAULT
   0, `last` INT(10) UNSIGNED NOT NULL DEFAULT 0, `view` INT(10) UNSIGNED NOT NULL
   DEFAULT 0, `host` VARBINARY(512) NULL, PRIMARY KEY(`No`) ) CHARACTER SET utf8
 * I only get:
 * ySQL said: Documentation
    #1146 – Table ‘my_prefix_ip_geo_block_cache’ doesn’t
   exist
 * I will try again tomorrow and post update…
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10470497)
 * You know, [@tokkonopapa](https://wordpress.org/support/users/tokkonopapa/),
 * I’ve said something similar before, and it certainly bears mentioning again, 
   that your dedication to your plugin and user support of it is outstanding, if
   not second to none that I have seen on wordpress.org.
 * I admire and thank you for that.
 * Having said that, I’ve had some unfortunate experiences dealing with tables that
   are not supposed to exist but do. In this particular case, I was able to somehow
   delete one table anyway, but on re-creation I am presented with this error:
 * #1005 – Can’t create table ‘my_prefix_ip_geo_block_cache’ (errno: -1)
 * Maybe you have seen this before, or can tell we how to proceed next?
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10471437)
 * Hi [@gastronimo](https://wordpress.org/support/users/gastronimo/),
 * We had met at [here](https://wordpress.org/support/topic/falling-into-a-blackhole/)!
 * > Having said that, I’ve had some unfortunate experiences dealing with tables
   > that are not supposed to exist but do.
 * Is it “[DB Error- Directory Table doesn’t exist](https://wordpress.org/support/topic/db-error-directory-table-doesnt-exist/)“?
 * I googled “[#1146 Table doesn’t exist](https://www.google.com/search?q=%231146+Table+doesn%E2%80%99t+exist)”
   and found a lot of similar issues in stack overflow:
    - [ Table doesn't exist. But it does (or it should) – Stack Overflow”>MySQL > Table doesn’t exist. But it does (or it should)](https://stackoverflow.com/questions/7759170/mysql-table-doesnt-exist-but-it-does-or-it-should)
    - [Bug? #1146 – Table ‘xxx.xxxxx’ doesn’t exist](https://stackoverflow.com/questions/6342201/bug-1146-table-xxx-xxxxx-doesnt-exist)
 * But unfortunately, I could not find a proper solution from these which I can 
   do something with my plugin. The most possible causes would be:
    - [This type of error usually indicates a problem with the underlying files in the MySQL data directory.](https://stackoverflow.com/questions/41891925/mysql-1146-table-doesnt-exist-fault-with-wordpress-or-mysql#comment-71003418)
    - [The issue is that you need the ib* files in the root of the MySQL datadir](https://stackoverflow.com/questions/7759170/mysql-table-doesnt-exist-but-it-does-or-it-should#answer-11696069)
 * My suggestion here is to execute [REPAIR TABLE](https://dev.mysql.com/doc/refman/5.6/en/repair-table.html)
   SQL if you find `your_prefix_ip_geo_block_cache` in your phpMyAdmin even if there’s
   the error “#1005 – Can’t create table ‘my_prefix_ip_geo_block_cache’ (errno: -
   1)”.
 * So after making a back up of your database, please try the following:
 * ![Repair table on phpMyAdmin](https://i0.wp.com/user-images.githubusercontent.
   com/828814/42407352-4ec23152-81f5-11e8-9190-fe1f48a89c40.png?ssl=1)
 * I think that trying various plugins and themes makes a lot of unused/unneeded
   tables in your MySQL. So refreshing your database may be another solution.
 * I’m sorry I can’t show you a concrete way to solve this issue for now. But please
   consider the above.
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10478167)
 * OK, that info is very useful, although not so much in my case, just because the
   table in question does not show up under structure, and is only listed on the
   file structure menu. However, as one link mentioned, I do have an upper case 
   letter in part of the DB name!
 * As I already exported the plugin settings, I guess I will try removing every 
   trace of IPGB manually then see what happens.
 * Thanks again
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10718399)
 * Hola [@tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)!
 * Just wanted to close this thread by reporting that I never found an online solution
   for the DB error, BUT I was able to successfully create a similarly named table(
   wp1_ip_geo_block_cache), the RENAME it to my main site (wp_ip_geo_block_cache),
   and voila! Seems to hold up fine.
 * Thanks for all.
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10718619)
 * Hi [@gastronimo](https://wordpress.org/support/users/gastronimo/),
 * Thank you for your feedback! And I am sorry to have made you a lot of hardship.
 * I’m not sure the original thread owner could solve the issue or not. But I’d 
   like to close this topic with the following information:
 * Verified the following environment in IPGB version 3.0.14 (with [`dbDelta()`](https://codex.wordpress.org/Creating_Tables_with_Plugins#Create_Database_Tables))
 * 1.
    – Server: Apache/2.4.3 – MySQL: 5.5.27 – PHP: 5.4.7 – PHP SAPI: apache2handler–
   WordPress: 3.7.27
 * 2.
    – Server: Apache/2.4.33 – MySQL: 5.7.21 – PHP: 5.3.5 – PHP SAPI: apache2handler–
   WordPress: 4.9.8
 * 3.
    – Server: Apache/2.4.33 – MySQL: 10.1.34-MariaDB – PHP: 7.2.7 – PHP SAPI:
   apache2handler – WordPress: 4.9.8
 * 4.
    – Server: nginx/1.13.2 – MySQL: 5.7.21 – PHP: 7.2.7 – PHP SAPI: cgi-fcgi –
   WordPress: 4.9.8
 * Thanks again!!
 *  [gastronimo](https://wordpress.org/support/users/gastronimo/)
 * (@gastronimo)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10719066)
 * SIDE NOTE: I just realized that with IPGB network activated the table ip_geo_block_cache‘
   appears’ to be present on all my subsites in phpMyAdmin– though actually selecting
   any (all except for one!) will return the error: #1146-table does not exist.
 * Looks like I will be manually deleting these ghost tables, then copying the only
   good table from the one subsite where it actually does exist to repopulate all
   the others…(Of course, if you do NOT have one good table example to work with,
   you will need to create a new one for a non-existing subsite like #0=’0’=_0_)
 * BONUS ROUND:
    So after much trial and error, this is my only way successful way
   to Delete ghost DB tables for IPGB cache repop:
 * 1) Select subsite# ghost table Structure ICON (not table name/link!) >>ignore
   errors
    1a) go to Operations>> from the bottom of window, not the top- Delete
   the table(DROP) >> Confirm – OK >> you will see ‘# unknown table’ popup 2) Switch
   to or Select (good) table from Recents (i.e.: wp_8_ip_geo_block_cache) 2a) go
   to Operations>> Copy table to subsite ‘0’ = wp_0_ip_geo_block_cache 3) Switch
   to or Select – wp_0_ip_geo_block_cache 3a) RENAME table from ‘0’ to desired subsite#(
   i.e.: wp_4_ip_geo_block_cache)
 * REPEAT the above for each ghost table entry 🙁
    then Recheck debug.log for errors
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10719728)
 * Good morning [@gastronimo](https://wordpress.org/support/users/gastronimo/) from
   japan,
 * I had tested multisite on some of the environment I wrote the previous thead,
   but not all.
 * > I just realized that with IPGB network activated the table ip_geo_block_cache‘
   > appears’ to be present on all my subsites in phpMyAdmin
 * That’s true.
 * In each site, three tables like `prefix_n_ip_geo_block_cache`, `prefix_n_ip_geo_block_logs`
   and `prefix_n_ip_geo_block_stat` would be created.
 * I think the last 2 tables might be OK in your sites. So I’ll investigate creating
   the cache table in particular.
 * Thank you for the side note and bonus round!
    -  This reply was modified 7 years, 7 months ago by [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/).

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘New install seeing error… ?’ is closed to new replies.

 * ![](https://ps.w.org/ip-geo-block/assets/icon-128x128.png?rev=1148568)
 * [IP Geo Block](https://wordpress.org/plugins/ip-geo-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip-geo-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip-geo-block/)
 * [Active Topics](https://wordpress.org/support/plugin/ip-geo-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip-geo-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip-geo-block/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [table doesn't exist](https://wordpress.org/support/topic-tag/table-doesnt-exist/)

 * 15 replies
 * 3 participants
 * Last reply from: [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/new-install-seeing-error/#post-10719728)
 * Status: resolved