Check table mysql.user: you probably have the account '%'@localhost. It's a 
pattern, and rot@localhost matches.When running SHOW DATABASES you see only the 
databases which you have some permissions.
Federico


      Da: Karthick Subramanian <ksubraman...@paycommerce.com>
 A: Maria Discuss <maria-discuss@lists.launchpad.net> 
 Inviato: Giovedì 4 Gennaio 2018 6:01
 Oggetto: [Maria-discuss] Is this normal behaviour?
   
All,
When I tried to connect in centos 7 mariadb 10.2.11 server using root user, by 
mistake I gave wrong user name, but it connected successfully. I am not sure 
why. When I check show databases, it didnt list all DBs, but when I connect 
with root again, I can see all valid Dbs. 
Is this normal that even if I give wrong user, it authenticate into DB server 
from root. 
[root@ipaddr ~]# mysql -u rotWelcome to the MariaDB monitor.  Commands end with 
; or \g.Your MariaDB connection id is 22Server version: 10.2.11-MariaDB MariaDB 
Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;+--------------------+| Database           
|+--------------------+| information_schema || test               
|+--------------------+2 rows in set (0.00 sec)
MariaDB [(none)]> exitBye[root@ipaddr~]# mysql -u rootWelcome to the MariaDB 
monitor.  Commands end with ; or \g.Your MariaDB connection id is 24Server 
version: 10.2.11-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;+--------------------+| Database           
|+--------------------+| mydb01     || information_schema || mydb02      || 
mysql              || performance_schema || test               
|+--------------------+6 rows in set (0.00 sec)
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to    : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help  : https://help.launchpad.net/ListHelp


   
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to