With 10.4.6-MariaDB on my Mac OS 10.14.5 Logged in as root I can see the list of users on my server with
MariaDB [(none)]> select Host,User from mysql.user;
+--------------+-----------+
| Host | User |
+--------------+-----------+
| localhost | |
| localhost | |
| localhost | root |
| localhost | user_Name |
| PCName.local | |
+--------------+-----------+
5 rows in set (0.001 sec)
but when logged in as user_Name and I check the current user
MariaDB [(none)]> select user()
-> ;
+-------------------------------+
| user() |
+-------------------------------+
| user_Name@localhost@localhost |
+-------------------------------+
1 row in set (0.000 sec)
That doesn't seem right to @localhost written twice.
So my question is why this happening?
mysql -uuser_Name -hlocalhost. Try it and see. – RolandoMySQLDBA Jul 24 '19 at 15:46