MySQL Forums
Forum List  »  MySQL Workbench

Re: Accessing remote data
Posted by: Martin Weaver
Date: May 24, 2017 04:45AM

Ok the connection string is in the MySQL Workbench GUI front end. It is the end of the create table statement. It is used to link, via this federated option, a table on one server to a table on another server.

But the statements will not work if you use the PC's name, it will not resolve the name.

Here is the complete create table command:

CREATE TABLE `cqt` (
`trayid` int(11) DEFAULT NULL,
`linking` int(11) DEFAULT NULL,
`pallet` int(11) DEFAULT NULL,
`traytype` text,
`trayact` int(11) DEFAULT NULL,
KEY `linking_idx` (`linking`),
CONSTRAINT `linking` FOREIGN KEY (`linking`) REFERENCES `csm` (`linking`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=FEDERATED CONNECTION = 'mysql://root:vision@192.168.0.171:3306/ezmysqltest/csm2'
DEFAULT CHARSET=utf8;

after the @ symbol is the linked computers IP address but it is also said you can put the computers name in there. Lets say that the computers name is Tioga and the IP address is 192.168.0.171 but the IP is not dynamic so it can change. So if you were to use the computer name then you would not have to worry.

As I said this command works

) ENGINE=FEDERATED CONNECTION = 'mysql://root:vision@192.168.0.171:3306/ezmysqltest/csm2'
DEFAULT CHARSET=utf8;

But this command does not

) ENGINE=FEDERATED CONNECTION = 'mysql://root:vision@Tioga:3306/ezmysqltest/csm2'

All of this is being done in a GUI front end.
DEFAULT CHARSET=utf8;

Options: ReplyQuote


Subject
Views
Written By
Posted
241
May 23, 2017 08:13AM
86
May 23, 2017 10:33AM
87
May 23, 2017 01:46PM
70
May 23, 2017 02:28PM
Re: Accessing remote data
77
May 24, 2017 04:45AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.