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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:09:32+00:00 2026-05-15T00:09:32+00:00

I have two MySQL databases for my site – one is for a production

  • 0

I have two MySQL databases for my site – one is for a production environment and the other, much smaller, is for a testing/development environment. Both have identical schemas (except when I am testing something I intend to change, of course). A small number of the tables are for internationalisation purposes:

TransLanguage – non-English languages

TransModule – modules (bundles of phrases for translation, that can be loaded individually by PHP scripts)

TransPhrase – individual phrases, in English, for potential translation

TranslatedPhrase – translations of phrases that are submitted by volunteers

ChosenTranslatedPhrase – screened translations of phrases.

The volunteers who do translation are all working on the production site, as they are regular users.

I wanted to create a stored procedure that could be used to synchronise the contents of four of these tables – TransLanguage, TransModule, TransPhrase and ChosenTranslatedPhrase – from the production database to the testing database, so as to keep the test environment up-to-date and prevent “unknown phrase” errors from being in the way while testing. My first effort was to create the following procedure in the test database:

CREATE PROCEDURE `SynchroniseTranslations` ()
LANGUAGE SQL
NOT DETERMINISTIC
MODIFIES SQL DATA
SQL SECURITY DEFINER
BEGIN

DELETE FROM `TransLanguage`;

DELETE FROM `TransModule`;

INSERT INTO `TransLanguage` SELECT * FROM `PRODUCTION_DB`.`TransLanguage`;

INSERT INTO `TransModule` SELECT * FROM `PRODUCTION_DB`.`TransModule`;

INSERT INTO `TransPhrase` SELECT * FROM `PRODUCTION_DB`.`TransPhrase`;

INSERT INTO `ChosenTranslatedPhrase` SELECT * FROM `PRODUCTION_DB`.`ChosenTranslatedPhrase`;

END

When I try to run this, I get an error message: "SELECT command denied to user 'username'@'localhost' for table 'TransLanguage'". I also tried to create the procedure to work the other way around (that is, to exist as part of the data dictionary for the production database rather than the test database). If I do it that, way, I get an identical message except it tells me I’m denied the DELETE command rather than SELECT.

I have made sure that my user has INSERT, DELETE, SELECT, UPDATE and CREATE ROUTINE privileges on both databases. However, it seems as though MySQL is reluctant to let this user exercise its privileges on both databases at the same time. How come, and is there a way around this?

  • 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-15T00:09:33+00:00Added an answer on May 15, 2026 at 12:09 am

    The answer to this question is extremely simple, disproportionately to the amount of time I spent typing it up. My problem was merely a case-sensitivity issue. That’s right, I capitalised in the names of the databases where I should not have. MySQL’s error messages, stating that I was denied permission to carry out the commands I had issued rather than informing me that the databases I was trying to access did not exist, misled me as to the nature of the problem. I leave the question up in case it is somehow instructive to someone, somewhere.

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

Sidebar

Related Questions

I have two MySQL databases: one for testing, and one for production. They are
I have two physically-separate MySQL databases on which I have to run a single
I have two tables in my MySQL database, one is a library of all
In a MySQL database I have two tables linked in a join. One table
What I have is two tables inside of a mysql database. One table contains
I have two different sites in my Intranet.. 1st site Database is MYSQL, &
When I have two mysql servers that have different jobs (holding different databases) but
I have two tables in a MySql database: COUNTRY --------------- id, country_name and CITY
I am working on PHP and database MySQL. I have two tables in SQL
I have the following two tables in my mysql database. Table Name: groups id

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.