0

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.

asked Mar 7, 2014 at 16:14
2
  • from shell "mysql -u yourserver -p -D dbname < your_sql_script.sql" Commented 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? Commented Apr 10, 2014 at 14:33

1 Answer 1

0

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.

answered Mar 7, 2014 at 18:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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