I need to install or import a .sql file into an empty database that I've created. The .sql file will install all the tables etc.
When I click MySQL Command line Client prompt, I add my credentials and then...(to install / import the .sql file)?
Thanks guys!!
use the MySQL command line client: mysql -h hostname -u user database < path/to/test. sql. Install the MySQL GUI tools and open your SQL file, then execute it.
To install MySQL Shell on Microsoft Windows using the MSI Installer, do the following: Download the Windows (x86, 64-bit), MSI Installer package from http://dev.mysql.com/downloads/shell/. When prompted, click Run. Follow the steps in the Setup Wizard.
Something like this:
shell> mysql db_name < script.sql
...specify your options: --user, --password, --host, --port...
More information - mysql — The MySQL Command-Line Tool.
From the MySql prompt, type:
\. file_name.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With