Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:54:11+00:00 2026-05-29T23:54:11+00:00

How does privilege users work on MySQL? Do all users who use a social

  • 0

How does privilege users work on MySQL? Do all users who use a social networking website each has a unique user privilege in order to connect to the db or all users use the same privilege such as:

$dsn = 'mysql:host=localhost;dbname=social_site';
$username = 'members';
$password = 'pa55word'; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:54:13+00:00Added an answer on May 29, 2026 at 11:54 pm

    No, generally speaking there will be one (or a small number) of MySQL users, and the PHP script (or other server side code) will use this one user to do all of the fetching and setting of data. In some scenarios it is helpful to create a handful MySQL users with various permissions levels, as an added level of security (so general select queries are run using a user with only select privileges and inserts and updates are handled by a separate user with those privileges). If you allow remote computers to access the MySQL database directly (for partners websites or applications) it’s also common to create a specific MySQL user for that connection with permissions limited to only what they need (no drop or modify permissions, for instance) and limited exclusively to their IP address (you can limit a MySQL user to connections from only a single address).

    The bottom line, is that you should only generally create a few users, and your website/application will use only this small pool of users to do all of the querying. Furthermore, it’s good practice to access the database with a user that has the fewest permissions possible to accomplish the tasks (within reason… don’t create a separate user for every possible action… usually 1-3 users should cover all permissions levels you’d want). If you create a huge number of users you’ll (a) slow down MySQL, as it has to access a larger permissions table; (b) it will be much harder to manage permissions if the application changes down the road; and (c) it’s more of a pain to debug permissions issues (your PHP script has more flexibility in what to do and report if there is a permissions issue).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How exactly does the copy_from_user() function work internally? Does it use any buffers or
Why does a user needs privileges over his own schema to create packages and
I need to know which views does a user have which privileges on. I'm
Does Google force employees who have offers from Facebook to leave immediately?
Does the Java language have delegate features, similar to how C# has support for
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone use have a good regex library that they like to use? Most
I've a php script that if the user ahs the privilege to download and
Does anyone know of a reliable way to store data to use across pages
Running show grants; indicates that I am logged in as a user with all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.