Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question

migrated from serverfault.com Mar 11 at 13:38

This question came from our site for system and network administrators.

    
from shell "mysql -u yourserver -p -D dbname < your_sql_script.sql" –  c4f4t0r Mar 7 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 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.