mysql_fdw icon indicating copy to clipboard operation
mysql_fdw copied to clipboard

failed to execute the MySQL query:

Open iamharikrishnank opened this issue 3 years ago • 4 comments

During executing the following query error occured postgres=# IMPORT FOREIGN SCHEMA mindsdb FROM SERVER mysql_minds INTO hrdb; ERROR: failed to execute the MySQL query:

iamharikrishnank avatar Nov 05 '21 05:11 iamharikrishnank

Thank you @iamharikrishnank for reporting an issue.

It will be good if you provide more details on this issue to understand it better.

  1. Could you please confirm that you have provided full command output?
  2. Please, try to access one of the remote tables residing in the mindset database to check whether the issue is with IMPORT FOREIGN SCHEMA or connection issue.
  3. Can you please provide details of server mysql_minds options.
  4. Please make sure the remote server is active and running.

vaibhavdalvi93 avatar Nov 05 '21 10:11 vaibhavdalvi93

@vaibhavdalvi93 I have executed following commands:

  • CREATE EXTENSION mysql_fdw;
  • CREATE SERVER mysql_minds FOREIGN DATA WRAPPER mysql_fdw OPTIONS (host '172.17.0.5', port '47335');
  • CREATE USER MAPPING FOR postgres SERVER mysql_minds OPTIONS (username 'mindsdb', password '');
  • GRANT USAGE ON FOREIGN DATA WRAPPER mysql_fdw TO postgres;
  • create schema hrdb
  • IMPORT FOREIGN SCHEMA "MINDSDB" FROM SERVER mysql_minds INTO hrdb;

iamharikrishnank avatar Nov 05 '21 10:11 iamharikrishnank

Thanks for providing the details. The issue is still not clear from the information provided. It would be good if you provide a complete reproducible test case for this issue. In addition to this - It would be good if you provide below information:

  • "MINDSDB" database dump from MySQL database so that we can restore at our end to reproduce the issue.
  • mysql logs generated during the IMPORT FOREIGN SCHEMA command to check exactly which query failed.
  • MySQL database version details.

surajkharage19 avatar Nov 09 '21 04:11 surajkharage19

HI @iamharikrishnank,

We have not received any further update on this from your end. We are happy to assist if you provide the required details. If the issue is resolved then can you please close the case from your end?

surajkharage19 avatar Jun 21 '22 04:06 surajkharage19