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

User database name lenght problem

togropl posted 5 years ago in General
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.
ansgar posted 5 years ago
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
togropl posted 5 years ago
My provider genarated automatically user name. This user name is 17 chars.
togropl posted 5 years ago
If I use NAVICAT 8 - is OK.
ansgar posted 5 years ago
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.

siMKin posted 5 years ago
@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)
ansgar posted 5 years ago
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.
siMKin posted 5 years ago
> 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
togropl posted 5 years ago
Provider - home.pl - POLAND. Check.
ansgar posted 5 years ago
Someone should cut their balls for providing a hacked MySQL server...

ansgar posted 5 years ago
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.
togropl posted 5 years ago
I use Heidi 5.
ansgar posted 5 years ago
Well, then you should be able to enter your long username, but you said you could not, so what's the problem now?
togropl posted 5 years ago
I dont now.
My Heidi is 5.0.0.3049 (today upgraded).
User name is 17 chars. Heidi use 16 chars.
ansgar posted 5 years ago
> 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?

togropl posted 5 years ago
In session manager I write 17 chars. Heidi read only 16 chars.
ansgar posted 5 years ago
Where exactly do you see that limitation to 16 chars? I see no code which cuts off the username.
togropl posted 5 years ago
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.
ansgar posted 5 years ago
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.
giuliano posted 5 years ago
Hi,
perhaps togropl is saying that DATABASE names, not USER names are truncated at 16 chars

sahiba posted 5 years ago
@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?
ansgar posted 5 years ago
Yes, would be nice to get feedback from togropl if the libmysql.dll hint fixed something.
togropl posted 5 years ago
No. libmysql.dll is not fixed.

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