Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database import error to mysql workbench #17

Open
Abumahiyusuf opened this issue Sep 9, 2023 · 3 comments
Open

Database import error to mysql workbench #17

Abumahiyusuf opened this issue Sep 9, 2023 · 3 comments

Comments

@Abumahiyusuf
Copy link

How can i import to mysql workbench please show us some steps

@PawaseBB
Copy link

To import data into MySQL Workbench, you can use the "Data Import/Restore" feature. Here are the steps to import data into MySQL Workbench:

  1. Open MySQL Workbench: Launch MySQL Workbench on your computer if it's not already open.

  2. Connect to your MySQL Server: Connect to the MySQL Server where you want to import data. In the MySQL Workbench home screen, click on the "Server Administration" or "Database" section, and then double-click on the server connection you want to use. You'll need to enter your MySQL server credentials if you haven't saved them previously.

  3. Select the Target Database: In the left-hand navigation pane of MySQL Workbench, expand your MySQL server connection, and select the database where you want to import the data. If the database doesn't exist, you can create it using the "Create a new schema" option.

  4. Import Data: To import data, go to the "Server" menu and select "Data Import." This will open the Data Import/Restore wizard.

  5. Choose Import Source:

    • Select the source of your data. It could be from a self-contained file (e.g., SQL dump, CSV file), from a previously saved MySQL Workbench task, or from a server instance (another MySQL server).
    • If you're importing data from a file, click the "Import from Self-Contained File" option and browse to locate the file.
  6. Specify Target Schema: Choose the target schema (database) where you want to import the data. You can either select an existing schema or create a new one during this step.

  7. Configure Import Settings:

    • Choose how you want to import the data, e.g., "Dump Structure and Data," "Dump Data Only," etc.
    • Configure other import options, such as altering tables or including DROP TABLE statements.
  8. Start Import: Click the "Start Import" button to begin the data import process. MySQL Workbench will display progress information, and once it's completed, you'll see a summary of the import process.

  9. Review Results: After the import is finished, you can review the results and check for any errors or warnings.

  10. Verify Imported Data: Finally, open your database in MySQL Workbench and use SQL queries or the graphical interface to verify that the data has been imported correctly.

That's it! You have successfully imported data into MySQL Workbench. Make sure your data source file is properly formatted according to your chosen import options to ensure a smooth import process.

@dhrax21
Copy link

dhrax21 commented Dec 4, 2023

#17 Hi, I want to work on this issue;

@ShibinaJohn
Copy link

#17
Hi, To import the data to the mysql workench, Here are the steps

  1. Follow the instructions which given in the Readme file and run the program.
  2. To connect with the mysql workbench: we need to add the jar file to the library and connect with the server.

Right Click on Database->New connection->Select Driver(MySQL)->Add jar file->change db name in JDBC url->make the connection) .After connecting to the server, Need to add jar file to the library(Libraries->Add Library(select the jar file and upload it))

3.To connect to the database: Change the credentials
connection

  1. Execute Queries: The next step is to execute the queries which they have already mentioned in the file. After executing it, all the tables get created.

  2. Check Queries: To import data to the database, check the INSERT query and change the database name and count of the placeholders should be equal to the Cloumn number.
    template ="INSERT INTO LMS.PERSON(ID, PNAME, PASSWORD, ADDRESS, PHONE_NO) VALUES (?,?,?,?,?)";

  3. Execute the Program: Run the program and import all datas. Attaching few images for your reference.
    BOOK
    BORROWER
    LIB
    PERSON

That's it! You have successfully imported data into MySQL Workbench.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants