Need advice on how to create a password protected database

They have: 1 posts

Joined: Oct 2009

Hi, I need some advice on a new database I am going to start working on. I need to be able to make information available to about a dozen different people. The database will contain info on milk producers' milk quality statistics. I will need one administrator who can access all info in the database and about 10 user accounts that will need to access only the info for their own farm.

I have created several websites but my experience with databases is limited. If anyone here can help point me in the right direction to get started with this, I'd appreciate it.

They have: 121 posts

Joined: Dec 2008

Yikes, that is a large question!
I'd start off by reading about database design. Setting up your database schema so the data you intend to store can be read and written in the manner you wish.

While you are designing, keep in mind the security access you mention, as well as any reporting you'll want to do now and into the future

Searching for "database design tutorial" brings up many good looking pages.

Your next step is creating the software that interacts with the database you've just designed. Choose the language you want to implement in, and search for tutorials that will get you started.

Hope this helps.
Cheers,
Shaggy

They have: 9 posts

Joined: Dec 2010

Yes ,,,,,,,you are right........thanks for nice question....then i agree with you,,,,,,,,,,,,

They have: 3 posts

Joined: Dec 2009

well, I suppose you're not meaning to give them access to run SQL queries, so you won't actually create users with different permissions, you'd rather code the php/asp/anything of your site in order to authenticate users and allow them to access only some parts of the website

you usually do this with a table where you save your usernames and passwords ( and email and everything else you need to store for each account ) and an access level, so depending on the access level you will let them do just few things in case they are standard users, or you will allow them do manage everything if the logged in user is an admin.

You need some development experience to translate this into something that will actually work.

stokes1900's picture

They have: 55 posts

Joined: Oct 2010

you need to develop application with user that have access level according their privelege. you have choice to create views in mysql . you need to do some research on this.

jessicaellen's picture

They have: 31 posts

Joined: Nov 2010

1. You have to reassign a new password for root user, dont leave it blank.
2. Create a new user with lmited access.
3. All of your applications must apply the new user role.
4. Else, you can still use root user access, but supply with a good password.

First of all, you have to login into your mysql client utility with admin/root user access.

CREATE USER
Code:
GRANT ~YOUR ACCESS HERE~
ON ~DATABASE AND TABLE~
TO ~USERNAME@HOSTNAME~
IDENTIFIED BY ~YOUR PASSWORD~
The code above is also create the user, not jutst giving some access.

E.Q:
Code:
GRANT SELECT, INSERT, UPDATE, DELETE
ON YourDatabase.*
TO 'MyName'@'localhost'
IDENTIFIED BY 'MyPassword'
Or maybe you want to change root user passw.
Code:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourNewPassword')

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.