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 5992597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:33:17+00:00 2026-05-22T23:33:17+00:00

Suppose I do the following: I create a MySQL database, and populate it with

  • 0

Suppose I do the following:

  • I create a MySQL database, and populate it with some data.
  • I create a MySQL user who has access only to that database, and who only has SELECT privileges.
  • I create a web page through which a user (any user, no password required) can enter arbitrary SQL, and on submitting the form, a script attempts to run the SQL as the MySQL user I created; any result set generated is displayed to the user; any error message generated is displayed to the user.
  • Assume that the database contains no stored procedures etc, just tables and views, and that I am happy for anybody to see any of the contents of that specific database.

We assume that the setup will be probed by a malicious user. What is the worst that could happen?

Some thoughts:

  • MySQL provides various statements like SHOW etc. that a user even having only SELECT privileges could use to gather information about the database server or about my databases. Other information could be obtained from error messages. While probably not sufficient to gain improper access, this information could surely help in doing so.
  • There might be flaws in the database software, or in my scripts, or in the scripting language itself, that could allow a visitor to do things they are not supposed to be able to do through this interface.
  • Doing this might violate a terms of service agreement, particularly if I am using shared hosting.
  • 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-22T23:33:18+00:00Added an answer on May 22, 2026 at 11:33 pm

    Hmmm. Clever users may attack via syntax like:

    select some_function_that_updates() from some_table;
    

    And there’s a denial of service attack that could blow memory, like:

    select * from some_massive_table cross join some_other_massive_table;
    

    And frankly, it’s hard enough for experienced programmers to write queries that behave well… what chance does a poor user have even if they try to write a good query

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

Sidebar

Related Questions

I'm getting the following data from a MySQL database +----------------+------------+---------------------+----------+ | account_number | total_paid
Suppose the following configuration: Drive D ... Data, Drive E .... TempDB, Drive F
Suppose the following data schema: Usage ====== client_id resource type amount Billing ====== client_id
Suppose you have a messaging system built in PHP with a MySQL database backend,
I got the following trigger on my sql server 2008 database CREATE TRIGGER tr_check_stoelen
Suppose I have the following tables: CREATE TABLE Game ( GameID INT UNSIGNED NOT
Suppose I have the following table definition: CREATE TABLE x (i serial primary key,
Suppose I have the following method, which can be used to create a collection
Examine the following scenario (source: http://phpweby.com/tutorials/mysql/32 ): mysql> SELECT * FROM products; +----+--------------+--------------+ |
I'm trying to improve my coding style. Consider the following scenario: Suppose that I

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.