[nycphp-talk] phpMyAdmin and MySQL DB Backup
Hans Zaunere
lists at zaunere.com
Sat Jul 24 11:59:41 EDT 2010
> Recently, I have had a DB dump/backup (created using the phpMyAdmin
> interface) fail because there is a single table in this db that needs
> this exception written into the backup file output: "SET
> SQL_MODE="NO_AUTO_VALUE_ON_ZERO";"
>
> It seems, the phpMyAdmin interface does not have an option to create
> this in a backup output.
>
> Is anyone familiar with a db backup/copy tool that can handle this
> special exception state and can backup/copy a db with this need?
Is using mysqldump available? It should always dump the schema (and data)
correctly per how it was created. If you can connect to the database using
the mysql CLI tool, then you can use the same connection string for
mysqldump and add --database dbname
> Two other small things:
>
> 1) This term: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO" << this is part of
> SQL or MySQL?
It's a MySQL parameter:
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
> 2) /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
> << if I see a row like this in a db dump, what is it? is this a comment
> or what?
It's a parameter again, that's only triggered for certain versions of MySQL
(4.01.01 or higher in this case):
http://dev.mysql.com/doc/refman/5.0/en/comments.html
H
More information about the talk
mailing list