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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:45:05+00:00 2026-06-02T08:45:05+00:00

I have database1 (~500MB), which can be access in a read-only mode by user1

  • 0

I have database1 (~500MB), which can be access in a read-only mode by user1.
I have empty database database2, with full privilege by user2.

Now, I want to clone database1 into database2.

I have tried mysqldump, but it says access denied.

Any better way? Thanks.

  • 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-06-02T08:45:07+00:00Added an answer on June 2, 2026 at 8:45 am

    By default, mysqldump tries to lock all tables before dumping them – in order to create a consistent snapshot. I assume that user1 does not have the privilege to do that.

    You can use either --single-transaction or --skip-lock-tables on the command line. The first option uses a single transaction for the whole operation. This works perfectly if all tables are transactional and the database is small. If the database is huge, this can have serious effects on other applications.

    If in doubt, try --skip-lock-tables first. However, the dump may be inconsistent, if other applications make changes during the dump.

    Complete example to clone database:

    mysqldump -h host1 -u user1 -ppass1 --single-transaction database1 |
    mysql -h host2 -u user2 -ppass2 database2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an application which reads ms access database file (test.accdb). When i
I have two database (connections to two servers), database1 and database2. Is there a
I'm trying to isolate duplicates in a 500MB database and have tried two ways
I have MySQL server with 500mb database running on a server with 8Gb of
I have: SQL Server 2008 Database Name: database1 I had taken backup from database1
I have multi databases in SQL Server. And database design such as Database1 Database1_Tmp,
I have a SQL Server 2005 database which has about 30-40 connections to the
I use SQL Server 2008. I have a database (Database1) that has one table
I have database application, I want to allow the user to restore the deleted
I have Database with date field. I see the time like: 1900-01-01 13:38:00.000 How

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.