Jump to content

Mysql User Administration

Recommended Posts

Good Folks,


I am relatively new to this community. I have been lurking in the background for a week or so.


I decided to develop and host a site at TCH as part of a research project where 100 or so responses need to be collected to an online survey. I am using the survey as an opportunity to better develop my web skills. I am developing the suvey using php, javascript and mysql.


The survey is not sensative or private data. However, it makes use of a username and password that will be given to participants to reduce the likelyhood of extranious data being entered.


For the sake of my question my database is call test_survey. It has two users test_srvyadm and test_srvyusr. The test_srvyusr is the username people who are filling out the survey will be given. The test_srvyadm will be the username for administering the survey and reviewing the results.


I am in the final stages of development. I have the survey setup where it collects, validates and enters data in to the database. I am in process of making some final refinements before I go into production.


My question is how do I set the rights of test_srvyusr in the database to just be able to insert rows? I have found plenty of documents that explain how to do this if I had root access to the database but as this is a shared environment I don't.


Maybe things work the same but I figured I would look for some guidance before I went for the trial and error approach.




Greg Donaldson

Link to post
Share on other sites

Hi Greg, and Welcome to the Family! :)


Well, unfortunately, since this is shared hosting, there's no way you can set up the access rights for the database users :(


You shouldn't have to worry too much about it, though, since you can use a different username and password for your users and the database access. What I mean is that you just need the database username and password if you want to handle it directly. Your users don't need (I think) to know the database username and password because you set those in your code and users will never see it.


This way you can provide your users with a certain password that will be checked in your code and the database user/pass are kept safe. ;)


If you need some help with this - or anything else - just ask here on the family forums. You'll have an answer to your post before you know ;)

Edited by TCH-Raul
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...