Support » Plugin: Yoast SEO » Getting “unable to create db tables” but db has permission

  • Resolved peterkay

    (@peterkay)


    I’ve successfully installed the plugin on 5 websites. 2 of them, however, still generate the “Yoast SEO was unable to create the database tables required and as such will not function correctly.” error.

    I have confirmed w/ my host that all of the website using Yoast are identically configured at the host level.

    The 2 sites with the errors had the critical failure when 14.0 came out – I went into recovery mode to deactivate the plugin.

    I’ve tried the following and no different:

    Removed all other plugins
    Activated only the default themes.
    Deleted and re-installed Yoast.

    I keep getting the same result. Below is the log entry my host support sent me – hope this helps.

    PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘blog_id’ in ‘field list’ in /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/vendor_prefixed/j4mie/idiorm/idiorm.php:464\nStack trace:\n#0 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/vendor_prefixed/j4mie/idiorm/idiorm.php(464): PDOStatement->execute()\n#1 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/vendor_prefixed/j4mie/idiorm/idiorm.php(1983): YoastSEO_Vendor\\ORM::_execute(‘INSERT INTO `wp…’, Array, ‘default’)\n#2 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/src/orm/yoast-model.php(662): YoastSEO_Vendor\\ORM->save()\n#3 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/src/models/indexable.php(160): Yoast\\WP\\SEO\\ORM\\Yoast_Model->save()\n#4 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php(276): Yoast\\WP\\SEO\\Models\\Indexable->save()\n#5 /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/src/builders/indexable- in /nas/content/live/aimforawe/wp-content/plugins/wordpress-seo/vendor_prefixed/j4mie/idiorm/idiorm.php on line 464

Viewing 8 replies - 16 through 23 (of 23 total)
  • Hi I am also having this issue on a SiteGround hosted site. I went through the steps mentioned above using the Yoast Test Helper plugin and then deleted and re-installed the Yoast SO plugin but have exactly the same problem “Yoast SEO was unable to create the database tables required and as such will not function correctly.” I also checked the MySQL DB owner permissions and all are set correctly, i.e. tables should be able to be created. Please advise. Note, this site is also set for WP autoupdates.

    Best regards

    VB

    • This reply was modified 1 year, 8 months ago by vincentejc. Reason: need updates
    Felipe

    (@felipeovalle)

    @marcanor none of your solutions works. Please, any other ideas?

    Plugin Support devnihil

    (@devnihil)

    @peterkay Based on the information you provided, we expect this to be a bug. We’re actively using the bug tracking on our GitHub repository so your best next step would be to create a new issue for our developers at https://github.com/Yoast/wordpress-seo/issues/new. You will need an account to create a new issue. If this is your first bug report, please check out: https://kb.yoast.com/kb/how-to-write-a-good-bug-report/.

    Thread Starter peterkay

    (@peterkay)

    yeah, no thanks @devnihil . I’ve already spent hours on this issue. I’ll be uninstalling this plugin instead.

    • This reply was modified 1 year, 8 months ago by peterkay.
    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We are sorry to hear that you’re going to uninstall our plugin. We are not aware of the COLLATE utf8_unicode_ci issue and as such, it requires a bug report so that our development team can investigate the issue further.

    Thread Starter peterkay

    (@peterkay)

    ok @mazedulislamkhan and @devnihil I’ll put more time into this. I created a github bug:

    https://github.com/Yoast/wordpress-seo/issues/15151

    Plugin Support Pcosta88

    (@pcosta88)

    @vincentejc @felipeovalle @efquintana

    If you are still experiencing the issue we ask that you please verify that you have a valid charset like utf8. The charset should not be empty and should show that. Your host provider can help with reviewing your charset.

    Once you verify you have a valid charset, if you use the Yoast Helper Tool does the issue resolve? Please try the steps below:
    – i. Install & activate the Yoast Test Helper plugin: https://wordpress.org/plugins/yoast-test-helper/
    – ii. Go to Tools -> Yoast Test
    – iii. Locate the Yoast SEO section and select the “Reset indexables tables & migrations” button
    – iv. Click the “Click here to speed up your site now” button in the SEO->Tools section.

    If the charset is valid AND THE ISSUE continues, per the forum guidelines, we ask that you please create separate topics for the issues you are experiencing. That way it’s easier to track issues and provide assistance on your specific concerns on your specific site.

    Plus, you will get your own alerts for the issue rather than someone else’s. You may make a new topic here: https://wordpress.org/support/plugin/wordpress-seo/#new-post.

    Thanks!

    Thread Starter peterkay

    (@peterkay)

    Fixed! The root cause of my problem was that my wp_config had:

    define(‘DB_COLLATE’, ‘utf8_unicode_ci’);

    but there was no:
    define(‘DB_CHARSET’, ‘utf8’);

    so the fix was to have this in my wp_config:
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ‘utf8_unicode_ci’);

    and on experimenting, this also worked:
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    I’m glad I decided to spend more time on this and went to github to report the bug – they gave me the hint and apparently updated this thread too. Thanks guys! Hope this helps others.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Getting “unable to create db tables” but db has permission’ is closed to new replies.