Use the DBeaver tool to connect to the local mysql database
In the previous article, I have already introduced how to find an alternative software for a certain software. If you don’t know how to find it, you can read the previous article:
Let me introduce a website that I often use to search for similar alternative software
As we all know, generally speaking, if you use mysql, most of you can use the navicat series, but this series of software is charged, so we use its alternative software DBeaver here. This is a free software.
DBeaver download address: https://dbeaver.io/
Steps to connect to the local mysql database with tools: (If you have not installed the database, please refer to the previous article: Installing the mysql database on the windows operating system )
After connecting according to the above configuration, click Test Connection, it will automatically help you download the jdbc driver jar package required for mysql connection.
How to solve the error Public Key Retrieval is not allowed when DBeaver connects to mysql?
After the driver package is downloaded, click Test Connection again. If nothing unexpected happens, the following prompt box will appear:
Don't panic, let's click the driver property of the page and change the allowPublicKeyRetrieval in the screenshot to true.
Then test the connection again to connect successfully:
Create the database of Ruoyi project and execute the sql file of the project
Generally, for open source projects found on the Internet, there will be database script files corresponding to the project in the source code directory. Generally, sql, docs, xxxdb, etc. may be used. You can search for them yourself, or search for *.sql files in the project source code directory try.
If the sql script file of the project is placed under the sql folder:
We can first observe the files in the sql folder to see if there is a script to create a database. No database creation script was found, so here we create a database ourselves:
First create a database named ry-vue in the DBeaver tool:
Then select the ry-vue database, open a sql query editor, and copy all the sql script files under D:\RuoYi-Vue\sql to execute:
After the scripts are executed, you will see that many tables have been newly created, and there will also be some initialized data in the tables, such as logged-in users, etc.:
At the same time, if I am a test novice, I can also use this database to practice and consolidate the basic usage of sql statements.
So far, we have completed the import of the Ruoyi project database script, the next step is to look at the configuration file of the project, change the relevant configuration in the code, and then try to start the project locally~
Follow me and unlock the following series of articles together.