The sql file named:bag.sql in /var/www/html/web(/var/www/html/web/bag.sql)
the current directory is [localhost web]i used mysql -uusername -p databasename > bag.sql
then let me input the password. i wait for long time, it doesn't show ok. why? how to import the database to mysql under centos.
if you have already created database then use below steps to import data from .sql file
tell which database to use:
use databasename;
Now give the source file path
source /var/www/html/web/bag.sql;
You need mysql -uusername -p databasename < bag.sql.
< Means "get the program's input from this file"
> Means "write the program's output to this file"
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