MySQL 8.4 · Connecting

Run a SQL file

Execute the statements in a file against a database.

mysql -u root -p mydb < script.sql

Official MySQL 8.4 documentation

More connecting commands

All connecting commands · MySQL 8.4 cheatsheet

Was this page helpful?