I'm fairly new to databases. I want to upload a .sql file to a mysql server. However the database I want to update contains many .frm .myi .myd files. Should I delete those files and replace with the .sql?

Any suggestions/tips would be greatly appreciated.

  • from shell "mysql -u yourserver -p -D dbname < your_sql_script.sql"
    – c4f4t0r
    Mar 7, 2014 at 16:59
  • What will "uploading" the .sql file accomplish? For example does the .sql file contain commands to create tables you wish to deploy on your database server?
    – Jeremy
    Apr 10, 2014 at 14:33

1 Answer 1


Back up the old database files to a dump using mysqldump -u username -p database_name > dump.sql then import the new sql file using mysql -u username -p database_name < new_sql_file.sql.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.