Bug #62108 adding @ in username while it should not add
Submitted: 7 Aug 2011 22:51 Modified: 6 Nov 2011 18:24
Reporter: Mahdi Zareie Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:1.0.10.0 OS:Windows (nothing)
Assigned to: Assigned Account CPU Architecture:Any

[7 Aug 2011 22:51] Mahdi Zareie
Description:
.net connector will not use the exact username that the programmer put in the Connection String and add @localIP to it !
yes it's good option when i am using a local mysql but when i am trying to connect to a Remote mysql and remote mysql will recieve some thing like it username@senderIP and this is not the user that remote mysql know !
remote mysql know username@remoetIP!

How to repeat:
just use a remote mysql you will see this Problem !

Suggested fix:
you should remove adding @localIP to username permanently!
if someone need it , he can add it manually..no ?
[6 Oct 2011 18:23] Fernando Gonzalez.Sanchez
Hi Mahdi Zareie,

Connector actually sends just the user. This behavior is managed by the MySQL server, accessing remotely appends @ipremote to the user, accessing locally appends @localhost.

You can check this running a query "select user, current_user();".
Same for other clients like JDBC driver for Connector/J.

You need to grant separately privileges to local and remote users, for example for user mahdi, you will do

grant all privileges on *.* to 'mahdi'@'localhost';
grant all privileges on *.* to 'mahdi'@'%';

(this is just an example, it is not recommeded to grant all privileges).

Let me know if this effectively solves your issue.
[7 Nov 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".