开发者

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

开发者 https://www.devze.com 2023-03-17 23:56 出处:网络
I need to be able of sync my webserver databases , matching them with my localhost database, but just the structure, not the records.

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

精彩评论

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