Scrivere un messaggio su Internet è come farsi un tatuaggio, solo un tatuaggio è più facile da cancellare.

— Anonimo

Reply to comment

@AmboSE87
Se usi mysqldump tra le prime righe del dump vedrai la stringa
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `nome_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
Se la modifichi togliendo i commenti in modo che diventi
CREATE DATABASE IF NOT EXISTS `nome_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
quando eseguirai il restore si comporterà esattamente come desideri.
Come nota, una funzionalità simile esiste per le singole tabelle:
DROP TABLE IF EXISTS `nome_tabella`;
CREATE TABLE `nome_tabella` e bla bla bla...

Reply

The content of this field is kept private and will not be shown publicly.