LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-08-2004, 09:14 PM   #1
reesee
Member
 
Registered: Jan 2004
Posts: 66

Rep: Reputation: 15
Is my MySQL secure?


Hello

I have one question reguarding mysql. I am the only user with a account, with global options. Is this secure? I hope I'm making myself clear. I want to know basically if having 1 user account nad it having global privileges is somehow a security hole.

Thanks.
 
Old 04-09-2004, 01:17 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well for starters, does the account use a password? If not, that's obviously a security problem. The password should be at least 8 characters, both alpha and numeric, and non-alpha/numeric if possible...

Perferably you should have one account for administration of user accounts, and then restrict other accounts to only access the areas of the database they need.

If you don't need any outside machines to connect to the database over IP, you should disable the TCP/IP connectivity and just use UNIX sockets. Also make sure that you've updated to a recent version that has the weak password hashing problem fixed.
 
Old 04-09-2004, 02:11 AM   #3
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Hi chort

For my mysql setup I have deleted the root account and the test database. I am the only user that has access to everything and my password and login name are 15 characters each, upper and lower case. I have permissions set correctly and the last thing I am wondering about is if I should create the user account your talking about with limited privs.

Thanks for the reply.
 
Old 04-09-2004, 03:00 PM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Sounds like you made a great start. You didn't mention if you require TCP/IP connectivity to the database itself (from another machine). If you don't need TCP/IP, then you should really disable the database from listening for it and use UNIX sockets only.
 
Old 04-10-2004, 02:22 AM   #5
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Yeah, I forgot to mention that. I have everything on one machine so I've added skip-networking in my 'my.cnf'. I still have my 1 account that I use that has full privs in mysql, should I create a new account with less privs?
 
Old 04-10-2004, 12:39 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well you have a great start. It's been a while since I setup MySQL, but if I recall you should be able to change the privileges on your "master" account so that it can only create new accounts. Then create an account that only has privileges to the areas of the DB that it needs to work on.

That would be Best Practices, but of course the main account could grant itself total privileges if it wanted to (it's just a barrier for script kiddies, etc). Also if you're not using a full-priv account to do administration, it's less likely that you'll accidentally blow something away (because it has access to far less stuff) and if the account is hijacked it won't be able to compromise the entire DB (although it will be enough to damage all your existing data, it just won't be able to create/drop other DBs, etc).
 
Old 04-10-2004, 10:28 PM   #7
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Great, thanks chort.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VSFTPD with secure & non-secure logins Ricci Graham Linux - Software 6 02-24-2020 11:49 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Secure email (SSL vs. secure authentication) jrdioko Linux - Newbie 2 11-28-2004 01:39 PM
postfix + mysql + pop3(secure something) and imap. (Serius Problems:/ ) Esid *BSD 0 07-25-2004 02:32 PM
vsftpd very very secure, so secure i can't use it... baronsam Linux - Networking 4 10-06-2003 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration