anatak Posted February 22, 2007 Share Posted February 22, 2007 Hello I am using Easyphp to develop my site. I wanted to export my database and then rename it in the text file and run the query (basically I wanted a copy of my database with a different name) The problem is that the export file is saved as a .sql file and when I open it with notepad and change I lose all the data in Japanese (utf encoded). Even saving the file as UTF in Notepad did not change that. This may sound stupid but does anybody know a free editor that I could use to open and edit an exported file ? Or maybe there is another way ? Is it possible to export / backup a mysql database using binary format ? thanks anatak Link to comment https://forums.phpfreaks.com/topic/39708-export-of-utf-database-on-windows/ Share on other sites More sharing options...
fenway Posted February 22, 2007 Share Posted February 22, 2007 Wordpad? Link to comment https://forums.phpfreaks.com/topic/39708-export-of-utf-database-on-windows/#findComment-191697 Share on other sites More sharing options...
shoz Posted February 23, 2007 Share Posted February 23, 2007 The dump of the database doesn't need to have the chosen database as part of its content. If you're using the "--databases" option then you can remove that and only use the "--opt" option. The sql file will then only include the table creation information and you can import the file into any database you choose. mysqldump --opt dbname > file.sql mysql dbname < file.sql --opt Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt. I don't know if it has always been enabled by default but it's an option I've always explicitly used. Link to comment https://forums.phpfreaks.com/topic/39708-export-of-utf-database-on-windows/#findComment-191784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.