OSSpk / Library-Management-System-JAVA

📚 A sophisticated Library Management System designed in Java while following the concepts of decoupled layers (entities) and minimal code in interface (GUI).
https://github.com/harismuneer
MIT License
326 stars 220 forks source link

Database import error to mysql workbench #17

Open Abumahiyusuf opened 11 months ago

Abumahiyusuf commented 11 months ago

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

PawaseBB commented 11 months ago

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 commented 8 months ago

17 Hi, I want to work on this issue;

ShibinaJohn commented 6 months ago

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.