Importing database help winscp

Hello i have been useing WinSCP to export my databases every month incase i ever needed a backup.
the command is

mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > output.sql

What i would like to learn is the command to import one of these databases once i have uploaded one to my site again.

From the command line, not inside MYSQL:

mysql -u username -p -h database-name < data.sql

And my memory is a little fuzzy since different hosts have different little details, so I can’t remember if it was DH where this didn’t work. In that case, mysqlimport might instead:

mysqlimport [options] db_name textfile1 [textfile2 …]

Of course, if it is a smaller file, you can always try phpmyadmin! That is probably the easiest way.

still a bit unclear on this.

like this?
mysql -u username -p -h database-name < data.sql
mysql -u=username -p=password database-name < data.sql

are the = not needed and can u be used instead of username=

can’t use phpadmin dreamhost is too weak to have that work right on large database.

I’ve answered this on the related thread “Can I increase the SQL max file size?” at: