MySQL Federated Tables Escaped Table Names

Posted by Gordon on Server Fault See other posts from Server Fault or by Gordon
Published on 2010-08-11T18:58:20Z Indexed on 2011/02/20 7:26 UTC
Read the original article Hit count: 529

Filed under:
|
|
|

I am trying to use MySQL federated tables. The problem is that the documentation specified at http://dev.mysql.com/doc/refman/5.0/en/federated-use.html says that a federated table should be created using the following format for the CONNECTION parameter:

scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name

E.G.

CONNECTION='mysql://username:password@hostname:port/database/tablename'
CONNECTION='mysql://username@hostname/database/tablename'
CONNECTION='mysql://username:password@hostname/database/tablename'

The problem is that the table I am trying to connect to has non-standard characters in it and I cannot find the proper way to scape them in the connections tring.

For example, a table named `Table (one)` . Which has the space and the parenthesis, requiring backticks surrounding it inside any SQL code.

Anyone know the proper way to do this?

© Server Fault or respective owner

Related posts about mysql

Related posts about url