开发者

php - how to sync localhost mysql database stucture to webserver database without data?

I need to be able of sync my webserver databases , matching them with my localhost database, but just the structure, not the records.

Per example if I add one new table to my localhost db, I run the script and it applyes to the server db populating it with default values.

How can I do that?

replication in not what I need, since it is automatic and I开发者_开发问答 don't want that. I think the phpmyadmin synchronization would be good, but it also sync records.


Use MySQL dump with --no-data switch. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-data

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜