MYSQL restore DB

Ali Jabak 0 Reputation points
2024-06-27T08:29:01.1166667+00:00

while restoring my DB using MYSQL workbench it creates my_row_number on the tables with AI PK, I need to stop the auto creation since causing issues in my API. If I restore the DB locally works fine only while restoring it on azure

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
874 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. GeethaThatipatri-MSFT 29,492 Reputation points Microsoft Employee
    2024-07-02T11:59:01.7366667+00:00

    @Ali Jabak From what I understand that the auto-creation of my_row_number during the MYSQL database restore is causing issues with your API.

    This seems to be a specific behavior of MYSQL Workbench when interacting with server.

     To prevent the auto-creation of my_row_number, you can try the following steps:

    ·     Before initiating the restore process, ensure that the AUTO_INCREMENT attribute is not set for the Auto Increment PK columns in the dump file.

    • Check the MYSQL Workbench preferences and settings for any options that might influence this behavior and adjust them accordingly.   MySQL :: MySQL Workbench Manual :: 3.2.2 SQL Editor Preferences
    • Consider using MYSQL command-line tools for the restore operation, as it might offer more control over the process.

    I hope this information helps.

    Regards

    Geetha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.