1432 - Unable to create a joined table. Data source connection string% s is not in the correct format

I am having a problem with combining data from a remote server to my local computer. My Remote table is MyISAM when I tried to execute

CREATE TABLE `wtc_test ( `wtc_companyworkday_id` bigint(20) DEFAULT NULL, ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://pentah: 0p@l @192.1**.*.*:3306/replica/wtc_test'; 

I got the following error: -

[Err] 1432 - Can't create federated table. The data source connection string 'mysql://pentah: 0p@l @192.1*.*:3306/replica/wtc_test' is not in the correct format

I see that my password contains the symbol "@", can someone help me.

+4
source share
2 answers

The wildcard in the MySQL names / hosts is MySQL % , not * . In addition, you indicate the destination, not the source, for example, when you create a user or grant privileges. Therefore, you'd better specify the host name or static IP address of your MySQL database server.

And try with " around your password, since single quotes will terminate the connection string.

 CONNECTION='mysql://pentah:" 0p@l "@yourHost:3306/replica/wtc_test'; 

But if I were you, I would just change the password. Password is not secure using the most exotic characters, this is an important length. Check it out .

+2
source

AS for MySQL documentation. When using the CONNECTION string, you cannot use the "@" character in the password. You can get around this limitation using the "create server" operator.

Example:

 CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql OPTIONS (USER 'USERNAME', HOST 'Host_IP', DATABASE 'DB_NAME', PORT '3306',Password 'PASSWORD'); 

After creating a link to the server, To create a table using this connection:

 CREATE TABLE test_table ( id INT(20) NOT NULL AUTO_INCREMENT, name VARCHAR(32) NOT NULL DEFAULT '', other INT(20) NOT NULL DEFAULT '0', PRIMARY KEY (id), INDEX name (name), INDEX other_key (other) ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='fedlink/test_table'; 

Follow the links below for more information about this: https://dev.mysql.com/doc/refman/5.6/en/federated-usagenotes.html https://dev.mysql.com/doc/refman/5.1/ en / federated-create.html

+2
source

Source: https://habr.com/ru/post/1488083/


All Articles