Does import of a .sql file to MySQL overwrite the existing db or append to it?

It depends on what commands the SQL file contains. Commands of interest are:

DROP DATABASE xxx;            # will delete the whole database
DROP TABLE xxx;               # unconditionally deletes a table
CREATE TABLE [IF NOT EXISTS]  # if IF NOT EXISTS adds the table, does nothing if exists
                              # otherwise, it adds the table, gives an error if it exists

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)