Importing `sa.sql` file into MySQL Database
To import a MySQL database file (`sa.sql`) file into your MySQL database using the command-line client:
mysql -u your_username -p your_database_name < /var/www/html/sa.sql
mysql -u root -p root@123 < /var/www/html/sa.sql
Replace `your_username` with your MySQL username, `your_database_name` with the name of the database where you want to import `sa.sql`, and `/var/www/html/sa.sql` with the full path to your `sa.sql` file.
Executing MySQL Commands
Show Databases
To list all databases in your MySQL server:
SHOW DATABASES;
Create Database
To create a new database named `lmsdb`:
CREATE DATABASE lmsdb;
0 Comments