SQL Error [1296] [HY000]: (conn=17) Got error 10000 ‘Error on remote system: 0: ‘ from FEDERATED

An error occurred when trying to connect the MariaDB with another remote MariaDB database. Create a remote Server for connectivity by using a FEDERATED engine but while trying to execute the following steps and test its throws the error:

-- Create a server remote link between two database
create server remote_link 
foreign data wrapper `mariadb`
options 
(
USER 'root',
PASSWORD 'password',
HOST 'localhost',
port 3307,
database 'hello'
);

-- Create a table using Server remote link
create table emp_4 engine = federated connection = 'remote_link/emp'

--Testing the select statement on emp_4
select * from emp_4;
Error:
SQL Error [1296] [HY000]: (conn=17) Got error 10000 'Error on remote system: 0: ' from FEDERATED

Solutions:

In my case, i am using MariaDB instead of MySQL causing the error:

create server remote_link 
foreign data wrapper `mysql`      ------ Replace MySQL here will fixed
options 
(
USER 'root',
PASSWORD 'password',
HOST 'localhost',
port 3307,
database 'hello'
);

Leave a Reply