MySQL 8.4 cheatsheet
MySQL 8.4: Connecting
6 common MySQL 8.4 tasks.
Connect to a specific host and database
Open the client on a given host, port and database.
mysql -h 127.0.0.1 -P 3306 -u root -p mydb
Run a SQL file
Execute the statements in a file against a database.
mysql -u root -p mydb < script.sql