The idea comes with a connection to the database
First make sure your MySQL is running
Open the idea to find the database (view —> Tool Windows —> database), and you can also set a shortcut key to facilitate daily operations in the future
That's it, then click the plus sign
Then you can write and execute SQL