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

  • Home
  • SEARCH
  • 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 6781903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:40:42+00:00 2026-05-26T16:40:42+00:00

This should be a really simple process but for whatever reason, I am unable

  • 0

This should be a really simple process but for whatever reason, I am unable to add a column to an MySQL table. Here’s my syntax:

$query = "ALTER TABLE game_licenses ADD lifetime VARCHAR(255) AFTER expire_date";
$result = mysql_query($query);
if (!$result) {
    echo "it failed";
}
else {
    echo "success";
}

I’ve tried multiple little changes like adding COLUMN to the query after ADD. There are no MySQL errors but finishes the script and echos “it failed”.

The error is:

ALTER command denied to user ‘webuser’@’localhost’

Is it possible to lock a table from being altered?

  • 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-26T16:40:43+00:00Added an answer on May 26, 2026 at 4:40 pm

    You don’t have the privileges to do so.

    Make sure you have the alter privilege on that table.

    Have the superuser (root) execute the following:

    GRANT ALTER ON dbname.game_licences TO `webuser`@`localhost` 
    

    See: http://dev.mysql.com/doc/refman/5.1/en/grant.html.

    P.S. Are you sure you want normal users to be able to issue alter statements?
    Better option may be to issue the alter statement as root, or even better to make an admin account that has full rights on the database, but not full rights on any other database.

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

Sidebar

Related Questions

This should be a really really simple thing, but for some reason it is
This seems like it should be really simple, but I'm unable to figure this
This should be really simple, but I have tried many solutions posted on the
This should really be allowed - I do not understand why it is not.
Overview I am using CompositeWPF to create an app using C#. This really should
This should be straight forward for a guru. I don't have any code really
This might be something very straight forward and I really think it should work
I'm really not sure how to approach this, but I am subscribing to events
This really shouldn't be hard, I just can't figure out how to do it.
This is a small doubt and something that shouldn't really come to one's mind.So

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.