473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Securing mysql db.

170 100+
Hi there,

Wondering if someone could enlighten me with either websites, or wisdom, as to how to secure my mysql database. I really need to know about how to guarantee that someone won't be able to hack into the db. Are we talking injection here? Is there anything else I should be aware of?

Thanks,
Nov 24 '08 #1
4 1624
bilibytes
128 100+
There are several ways to secure your database. it will depends on many factors.

First you have to ensure your physical server is safe... if it is at home then is your home safety? if you are using a remote hosting, then you should determine whether the owners of that hosting are trustworthy people... so as i said it depends who you want to protect yourself against. if you are storing illegal content as: i don't know but whatever.., then, if you don't have your server in a bunker your db wont be physically safe from law as "they"(lol) can look wherever they want

Don't forget to figure out if your server is electrically safe, if the voltage raises in a way that it burns your motherboard, then you can forget of all the data that was being processed at that moment (and pray to get hard disk content back). Did you think about the coffee cup that you normally put on the top of your server while changing your passwords to keep those hackers away? did you think of the damages that it could cause if it were to reverse on the wires?

Now that you have determined whether the physical database is safe, you have to check for the network attacks.

Since you are connected to the internet, there is a common access point to your database.
you have then to check if your server is safe enough. you can protect it as much as you want, but if you are receiving your host account passwords through your mail, then you are again in trouble. haha.

You have got to think of security through this point if view: your "system" is as secure as the most insecure entity that has a direct or indirect access to it.

kindly bilibytes
Dec 10 '08 #2
MMcCarthy
14,534 Expert Mod 8TB
I have deleted all posts in this thread other than the reply to the original question with some minor edits. There are a number of points to keep in mind here.

Firstly, this is a community of volunteers. The IT professionals who answer questions on this forum give of their free time to help others and while there is a sincere attempt to respond to all questions they are under no obligation to do so. This allows us to keep the site free of paid subscription membership and open to all.

If a disagreement arises in any thread then it is better to draw it to the attention of a forum moderator or if one is not available any site moderator or admin. We discourage these kind of disagreements being dealt out in thread postings as we don't feel future visitors need to see this kind of thing when they are simply searching for an answer to their question.

If in the future there is no answer to a question you post in a reasonable period of time (a day or two) then it is acceptable to post a 'Polite' reply to the thread to bump it up the forum list to try to gain attention to it. However, while we maintain our desire to answer all questions sometimes this does not happen and while this is regrettable the alternative is to turn this site into a 'pay to view' site which nobody wants.

If either of you would like to discuss this further feel free to contact me by PM and I will try to resolve any issues.

Mary
ADMIN
Dec 10 '08 #3
blyxx86
256 100+
My suggestion to you is to make sure that you are using limited credentials at all points.

Meaning, if all someone is doing with your database is making SELECT statements, give them only select permissions. If an update is needing to be performed, perhaps a user has both SELECT and UPDATE permissions. With the MySQL Administrator you can assign permissions on a table level basis, meaning a user can have SELECT access to all except one table (or visa versa) and have SELECT UPDATE INSERT DELETE permissions on another.

Back to limited creds. Make sure only the people with root access or administrator access login as those users if needed. It's a shame that so many of us IT people are guilty of using an administrator login for everything. This exposes the system to a potential security risk. Also, be sure that admin/root passwords are changed regularly and stored in safe locations.

Make sure that if you are storing the database on a server that physical access to the server be limited. It's very easy to install a keylogger device if one has access to the physical computer.

SQL injection can be fixed with various methods, the most common is replacing certain characters like the ' or " with their escaped versions. ]\' or \" or something similar (depends on languages). PHP offers a function to do the mysql_real_escape_string($variable) for you.

Hopefully this helps you out and will get you started.
Dec 29 '08 #4
beary
170 100+
Hey blyx,

Many many thanks for this response. It's exactly what I was originally after. Thanks very much.
Dec 29 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: David McNab | last post by:
Hi, I'm writing a web app framework which stores pickles in client cookies. The obvious security risk is that some 5cr1p7 X1ddi35 will inevitably try tampering with the cookie and malforming...
1
by: ejpoirier | last post by:
I'm trying to get https to work for Web Services in PHP. I've installed PHP 5.0.5 with the following configuration line: ../configure --with-mysql=/usr/local/mysql \...
2
by: James | last post by:
What's the best way of securing online databases and web services? At present I am using a database password, which of course is not hard-coded into the web service, but this means re-submitting it...
11
by: Wm. Scott Miller | last post by:
Hello all! We are building applications here and have hashing algorithms to secure secrets (e.g passwords) by producing one way hashes. Now, I've read alot and I've followed most of the advice...
3
by: Tyson Marchuk | last post by:
Hello, Background info Kind of new to using databases and I'm writing an app in C# which connects to a MySQL database. I was using the ODBC connector and a DSN entry to connect to the database...
9
by: Harold Crump | last post by:
Greetings, I have a fairly vanilla PHP web application that stores and retrieves data in a MySQL database. Users will be adding a lot of special characters such as single and double quotes,...
4
by: Stephen Poley | last post by:
Whenever anyone has a question about securing an Access database he/she is usually referred (unsurprisingly) to the Security FAQ. This is however incomplete/unclear with respect to databases with a...
4
omerbutt
by: omerbutt | last post by:
hi every one I am A new Bee to php mysql and i was surfing through the net to learn about how to secure the mysql when you are working in a web environment while working with php html and javascript...
1
by: pantone187 | last post by:
Hi everyone, I'm a pretty novice PHP programmer as all I've done so far is to do simple registration forms for events. The data that's going from the from to the database (mySQL) didn't need much...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.