Issue with Create new - Table copy

[expired user #7790]'s profile image [expired user #7790] posted 10 years ago in General Permalink
"Create new - Table copy" doesn't work as "user" name gets truncated (last 6 characters).... SQL Error (1044): Access denied for user 'dbm.camping-cana'@'%' to database 'information_schema'.
ansgar's profile image ansgar posted 10 years ago Permalink
What's the previous SQL code you see in the SQL log panel at the bottom?
[expired user #7790]'s profile image [expired user #7790] posted 10 years ago Permalink
date/time : 2014-02-18, 08:20:13, 237ms
computer name : JL-PC
user name : JL
registered owner : JL / Microsoft
operating system : Windows 7 x64 Service Pack 1 build 7601
system language : English
system up time : 4 days 21 hours
program up time : 11 minutes 29 seconds
processors : 8x Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
physical memory : 10198/16347 MB (free/total)
free disk space : (C:) 1431.80 GB
display mode : 2560x1440, 32 bit
process id : $2958
allocated memory : 104.16 MB
largest free block : 8185.34 GB
executable : heidisql.exe
exec. date/time : 2014-01-25 11:34
version : 8.3.0.4694
compiled with : Delphi XE5
madExcept version : 4.0.8.1
callstack crc : $151cbb27, $3b27b1cb, $3b27b1cb
exception number : 5
exception class : EDatabaseError
exception message : SQL Error (1044): Access denied for user 'dbm.camping-cana'@'%' to database 'information_schema'.
ansgar's profile image ansgar posted 10 years ago Permalink
I meant the *SQL code* which is displayed in the log panel. Please post the last 5 lines of SQL here.
[expired user #7790]'s profile image [expired user #7790] posted 10 years ago Permalink
/* 2014-02-18 14:14:26 [] */ /* Writing to session log file now: C:\Users\JL\AppData\Roaming\HeidiSQL\Sessionlogs\000002.log */
/* 2014-02-18 14:14:28 [CampingCanada] */ /* Connecting to megasqlservers.com via MySQL (TCP/IP), username dbm.camping-canada.com, using password: Yes ... */
/* 2014-02-18 14:14:28 [CampingCanada] */ /* Connected. Thread-ID: 19005725 */
/* 2014-02-18 14:14:28 [CampingCanada] */ SHOW STATUS;
/* 2014-02-18 14:14:28 [CampingCanada] */ SHOW VARIABLES;
/* 2014-02-18 14:14:28 [CampingCanada] */ USE `Campgrounds_camping-canada_com`;
/* 2014-02-18 14:14:28 [] */ /* Entering session "CampingCanada" */
/* 2014-02-18 14:14:28 [CampingCanada] */ SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='Campgrounds_camping-canada_com';
/* 2014-02-18 14:14:28 [CampingCanada] */ /* SQL Error (1044): Access denied for user 'dbm.camping-cana'@'%' to database 'information_schema' */
/* 2014-02-18 14:14:28 [CampingCanada] */ SHOW TABLE STATUS FROM `Campgrounds_c
ansgar's profile image ansgar posted 10 years ago Permalink
usernames in mysql are restricted to 16 characters, but you specified a longer one which must fail when connecting. Just try out connecting normally to that session.
[expired user #7790]'s profile image [expired user #7790] posted 10 years ago Permalink
I am able to connect (open a session) using the 22 char user defined in session manager! Why is it ok there & not on copy-table?
ansgar's profile image ansgar posted 10 years ago Permalink
By "copy-table" you mean the SQL export dialog, or the "Create new" > "Table copy" thing?

That message "Access denied for user 'dbm.camping-cana'@'%' to database xyz" is generated by the server.

You probably somehow managed to create a username longer than 16 chars and now you're running into problems here. Please try to shorten your username to max 16 chars.

Also, have a look into the mysql.user table. There is a "User" column in that table. Watch out for its maximum length in the table designer, should be 16. Then look into the data of that table, if your user really has more than 16 chars.
[expired user #7790]'s profile image [expired user #7790] posted 10 years ago Permalink
Even with user of 16 char, same error!
ansgar's profile image ansgar posted 10 years ago Permalink
And the error is happening again in this line?
SELECT `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`='Campgrounds_camping-canada_com'

Please login to leave a reply, or register at first.