Skip Navigation

[Resolved] Updating the database

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am trying to update the database on one of our sites and it always fails at the same point:

Precondition "able to create a new database table"... ERR

Solution:

It is a MYSQL user permission problem, you can follow MYSQL document to grant all Privileges to specific database for your MYSQL user:

https://dev.mysql.com/doc/refman/8.0/en/grant.html#grant-database-privileges

Relevant Documentation:

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by komalaS 4 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2103493

Can you please remove my site URL from this ticket? It would have been good to know that all requests are posted publicly as soon as they're submitted.

I am trying to update the database on one of our sites and it always fails at the same point:
> Precondition "able to create a new database table"... ERR

From the error logs:
WordPress database error CREATE command denied to user '[user]'@'localhost' for table 'wp_toolset_migration_precondition_test_table' for query CREATE TABLE wp_toolset_migration_precondition_test_table ( id bigint(20) unsigned not null auto_increment, PRIMARY KEY (id)) made by do_action('wp_ajax_types_relationships_database_upgrade'), WP_Hook->do_action, WP_Hook->apply_filters, Toolset_Ajax->__call, OTGS\Toolset\Types\Ajax\Handler\RelationshipsDatabaseUpgrade->process_call, OTGS\Toolset\Common\Relationships\DatabaseLayer\Version2\Migration\MigrationController->do_next_step, OTGS\Toolset\Common\Relationships\DatabaseLayer\Version2\Migration\Step01PreMigrationCheck->run, OTGS\Toolset\Common\Relationships\DatabaseLayer\Version2\Migration\Step01PreMigrationCheck->check_precondition, OTGS\Toolset\Common\Relationships\DatabaseLayer\Version2\Migration\Step01PreMigrationCheck->OTGS\Toolset\Common\Relationships\DatabaseLayer\Version2\Migration\{closure}

WordPress database error DROP command denied to user '[user]'@'localhost' for table 'wp_toolset_post_guid_id' for query TRUNCATE TABLE wp_toolset_post_guid_id made by do_action('wp_ajax_toolset_clear_post_guid_id_cache'), WP_Hook->do_action, WP_Hook->apply_filters, Toolset_Ajax->__call, Toolset_Ajax_Handler_Clear_Post_Guid_Id_Cache->process_call, OTGS\Toolset\Common\Utils\TypesGuidIdGateway->truncate, WPCF_Guid_Id->truncate

#2103553

Hello,

I don't see your website URLs in this ticket.

And according to the debug logs you provided above, there is a MYSQL user permission in your website, you can follow MYSQL document to grant all Privileges to specific database for your MYSQL user:
hidden link
section "Database Privileges"
hidden link

#2104355

That worked, thank you! Our web hosting was migrated by our provider recently, so they must have removed some permissions.
The support form asks for a URL then displays it on the public topic that is created on the forums. But it looks like you have found it.