View Single Post
  #1   (View Single Post)  
Old 13th December 2008
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default MySQL permission oddity

I have MySQL running on my FBSD box at home, finally. I decided to make a small database for analyzing /var/log/messages, as my system has been under an interested distributed hack attempt lately and I wanted to see if it would actually be useful to try blacklisting the addresses (sometimes over 200 different addresses attempting ssh connections in one day).

To make a long story less long, I made a database "hackers", with one table "attempts". This table has three columns "time_id", "IP_address", and "faileduser_id".

If I connect to the database as root, I can see the table and columns correctly. Obviously this is not a good practice so I then made a database account "syslog" and gave it permissions accordingly:
Code:
grant all on hackers to syslog@localhost identified by 'PASSWORD';
where of course PASSWORD is replaced by my awesome, secure password.

So then I connect to the database as syslog:
Code:
> mysql -u syslog -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
And connect to the database and look for tables:
Code:
mysql> connect hackers;
Current database: hackers

mysql> show tables in hackers;
Empty set (0.00 sec)
Any MySQL guys out there who might know what is going on here? As I said, the user root on the same MySQL instance can see the tables just fine.
Reply With Quote