SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2008
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newb biting off more than he can chew ... help...

    I'm making a website that will facilitate multiple users updating various sets of data.

    I'm a complete novice with MySQL, but I'm learning fast!

    My question is, should I use the same dba user account to do all the updates/modifcations (through PHP), or should I create a new user account for each registered user of the system?

    If anyone has time to explain the "why" part I'd be appreciative.

    Thanks very much.

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there are some really good tutorials at dev dot mysql dot com that may help you out if you don't get a quick answer this morning. Good luck!

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2008
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone got a quick answer?

  4. #4
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure I get your questrion...

    If you are asking, should they all use the same login account? non!

    If you mean should they each have their own db account for their db connection?.. non!

    In my experience/opinion (limited), they should each use the same db connection with privileges limited to the minimum sufficient for their potential tasks. You might also find it useful to have a column in your tables, to show who (which username) uploaded a file, and when.

    bazz

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you've confused mysql user accounts with something like a login/registration system in php. Generally, you make a single mysql user account for a php script/website. The php script will use this account to log into mysql. From there, php can perform a query on the database.

    To give an example...imagine this forum. The php code which powers the forum uses a single mysql account, despite having many many thousands of users who are allowed to post/view/delete. It's even able to be logged in at the same time as other php scripts using the same account.

    The php script is in charge of restricting what a user does.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •