"You could also try using a database name that doesn't need to be quoted,
like guacamole_0_9_13 or similar."

Winner winner!  Thanks!

On Tue, Jan 9, 2018 at 1:05 PM, Mike Jumper <mike.jum...@guac-dev.org>
wrote:

> On Tue, Jan 9, 2018 at 10:19 AM, Zach Bonjour <
> zbonj...@vibrantcreditunion.org> wrote:
>
>> ...
>> ERROR: Unable to execute constraint query
>> ALTER TABLE guacamole_0.9.13.guacamole_user_permission add CONSTRAINT
>> `guacamole_user_permission_ibfk_2`
>> FOREIGN KEY (`user_id`)
>> REFERENCES `guacamole_0.9.13`.`guacamole_user`
>> (`user_id`)
>> ON UPDATE RESTRICT
>> ON DELETE CASCADE
>> . Error: Query failed. 1064 (42000): You have an error in your SQL
>> syntax; check the manual that corresponds to your MySQL server version for
>> the right syntax to use near '.13.guacamole_user_permission add CONSTRAINT
>> `guacamole_user_permission_ibfk_2`
>> ' at line 1
>> ubuntu@ip-172-31-11-33:~$
>>
>>
> Perhaps the guacamole_0.9.13 in your ALTER TABLE needs to be quoted
> because of the periods in the name? ie:
>
> ALTER TABLE `guacamole_0.9.13`.guacamole_user_permission ...
>
> If you didn't write this statement yourself, it looks like mysqldbcopy is
> generating invalid SQL. I'm not sure if there's any difference in what
> happens behind the scenes between mysqldbcopy and mysqldump, but you might
> try just using mysqldump to dump the contents of the original database, and
> then run that script against the new database. That's how I've always
> handled backing up or copying MySQL databases in the past.
>
> You could also try using a database name that doesn't need to be quoted,
> like guacamole_0_9_13 or similar.
>
> - Mike
>
>


-- 
<https://www.vibrantcreditunion.org/>

*Zach Bonjour*
DevOps Engineer
800-323-5109 x2000 | *vibrantcreditunion.org
<http://vibrantcreditunion.org>*
<https://vibrantcreditunion.org>

-- 
NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. 
The message, together with any attachment, may contain confidential and/or 
privileged information. Any unauthorized review, use, printing, saving, 
copying, disclosure or distribution is strictly prohibited. If you have 
received this message in error, please immediately advise the sender by 
reply email and delete all copies.

Reply via email to