I get confusing error when try to connet to remote db via tunnel.php script.
Db username is test_izumgoroda_ru, and error message text is Access denied for user 'test_izumgoroda_'@'vm-zdd16.host.ru' (using password: YES).
Well, if I set username to something like abcdefghijklmnopqrstuvw, then error is "Access denied for user 'abcdefghijklmnop'@'vm-zdd16.host.ru' (using password: YES)"
It looks like there is a limit to username length (16 characters)
So how cat i connect to my db server if username is greater than 16 chars?
Username length limit
The "Access denied for user 'test_izumgoroda_'@'vm-zdd16.host.ru' (using password: YES)." message is thrown by the MySQL server. And it's likely that your MySQL server is of version 4 or earlier.
The problem is that MySQL of the version 4 allows to create a user with name longer than 16 symbols, but it cuts it to 16 symbols without informing about it. Pay attention that even in the message you've sent (Access denied for user 'test_izumgoroda_'...) the username is not "test_izumgoroda_ru" (18 symbols), but "test_izumgoroda_"(16 symbols). In MySQL version 5 the message "String 'test_izumgoroda_ru' is too long for user name (should be no longer than 16)" is thrown when you are trying to create a username longer than 16 symbols. We recommend you to create a user with a name up to 16 symbols or use a newer version of MySQL.
See also: http://dev.mysql.com/doc/refman/5.1/en/grant.html
Note: GRANT supports host names up to 60 characters long. Database, table, column, and routine names can be up to 64 characters. User names can be up to 16 characters.
Thanks.
The problem is that MySQL of the version 4 allows to create a user with name longer than 16 symbols, but it cuts it to 16 symbols without informing about it. Pay attention that even in the message you've sent (Access denied for user 'test_izumgoroda_'...) the username is not "test_izumgoroda_ru" (18 symbols), but "test_izumgoroda_"(16 symbols). In MySQL version 5 the message "String 'test_izumgoroda_ru' is too long for user name (should be no longer than 16)" is thrown when you are trying to create a username longer than 16 symbols. We recommend you to create a user with a name up to 16 symbols or use a newer version of MySQL.
See also: http://dev.mysql.com/doc/refman/5.1/en/grant.html
Note: GRANT supports host names up to 60 characters long. Database, table, column, and routine names can be up to 64 characters. User names can be up to 16 characters.
Thanks.