0

There is a database file in this path : /var/www/db.sql in server.

Our database size is about 800mb.

we have to upload this sql file to the database : "age"

username : root, password : pass, database password : dbpass

i am trying this command . but its not working.

mysql -u root -p pass age db.sql

i followed this link : https://stackoverflow.com/questions/19483087/importing-large-sql-file-to-mysql-via-command-line

please give the correct command

2

You're shell command is missing the shell redirect input operator: <. This tells mysql to read in the file "db.sql". See https://www.gnu.org/software/bash/manual/html_node/Redirections.html (assuming you're using bash or equivalent).

Try: "mysql -u root -p pass age < db.sql"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.