distal-attribute
distal-attribute
distal-attribute
distal-attribute

User database name lenght problem

User, date Message
Written by togropl
4 years ago
Category: General
9 posts since Thu, 04 Feb 10
Sorry of my English.
I use Heidi 5. If my user name database is 17 chars - heidi use only 16 chars. I cant login to my mysql.
Please help.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
HeidiSQL just follows the MySQL implementation, which says the user name can have a maximum length of 16 chars. You can see that in your table mysql.user - the column "User" is defined as VARCHAR(16). See screenshot:



... and the docs: http://dev.mysql.com/doc/refman/5.0/en/user-names.html
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
My provider genarated automatically user name. This user name is 17 chars.
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
If I use NAVICAT 8 - is OK.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Oh.. really? Well, I could easily extend the maximum length of the username input field. Only I thought it would not help either if the server is not able to process such long usernames.
Written by siMKin
4 years ago
104 posts since Sun, 01 Apr 07
@togropl
it sounds quite impossible what you're describing.

first: it is impossible to store a string that is longer then the defined length of the (var)char column. Mysql will always either cut it of (and generate a warning) or throw an error (in strict mode)

second: it is simply not possible to create a username longer than 16 characters. some prove:

CREATE USER seventeencharacte;//
/* SQL Error (1470): String 'seventeencharacte' is too long for user name (should be no longer than 16) */



So, it's only preferable that heidi doesn't allow this either (to avoid confusion)
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Well I don't think togropl is lying. Probably his hoster has compiled modified sources of the MySQL server in a way that it accepts longer usernames. Sounds odd but obviously the case here.
Written by siMKin
4 years ago
104 posts since Sun, 01 Apr 07
> Well I don't think togropl is lying

I'm sorry if it sounded like i was implying that! I didn't mean to do that at all!

I just wanted to make a strong point why heidi shouldn't change it's current behaviour smile
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
Provider - home.pl - POLAND. Check.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Someone should cut their balls for providing a hacked MySQL server...
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
togropl: I just checked that and wonder that the username input field already allows unlimited length of text. So I guess you are using an old version of HeidiSQL? You should update at least to the 5.0 beta in that case.
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
I use Heidi 5.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Well, then you should be able to enter your long username, but you said you could not, so what's the problem now?
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
I dont now.
My Heidi is 5.0.0.3049 (today upgraded).
User name is 17 chars. Heidi use 16 chars.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
> Heidi use 16 chars

Well, that was what I wanted to tell you - Heidi allows longer usernames, you should see that in the session manager, don't you?
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
In session manager I write 17 chars. Heidi read only 16 chars.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Where exactly do you see that limitation to 16 chars? I see no code which cuts off the username.
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
I have two databases. Name of one of them has 16chars and the second 17 chars, but they differ only the last char (my provider adds next number at the end of the name of the second database). Both databases have the same password. When I Login to the first database with 16 chars there is everything ok but when I try to login to the second (17 chars) then Heidi login me to the first database - cut this 17th chars.
When I change password to the second database I can't login.
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Ok, understand. So you were just guessing that Heidi cuts at 16 chars. In fact Heidi does not cut your username, I checked that.

I think that the server, not the client library has this limitation, but I may be wrong - in which case it may help to check if Navicat uses a different libmysql.dll and place that one into your heidisql directory.
Written by giuliano
4 years ago
19 posts since Sat, 19 Dec 09
Hi,
perhaps togropl is saying that DATABASE names, not USER names are truncated at 16 chars
Written by sahiba
4 years ago
1 posts since Wed, 10 Mar 10
@togropl
Hi! I have the same problem on home.pl
I have 18 chars domain and my database is name after domain and also has 18 chars. Every another database is domain+digit (1,2,3) so it will be 19 chars.
Username is the same name as database, and home.pl claims, that he cannot add another user or change user name. I do not know what to do.
User in MySQL must be max 16 char.
Did you solve your problem?
Written by ansgar
4 years ago
4790 posts since Fri, 07 Apr 06
Yes, would be nice to get feedback from togropl if the libmysql.dll hint fixed something.
Written by togropl
4 years ago
9 posts since Thu, 04 Feb 10
No. libmysql.dll is not fixed.
 

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