如何把3个不同的MySQL数据库数据整合到一个MySQL数据库中?
PHP中文网
PHP中文网 2017-04-17 15:14:20
0
3
665

现在有3个网站分别是discuz,phpcms,thinkphp开发的,他们有各自的用户数据,想把这3个MySQL数据库中的数据整合起来放到一个数据库中,应该如何操作最好呢? 新建一个MYSQL数据库新设计数据表然后从3个原数据库中把数据读出来写进去么?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
伊谢尔伦

I don’t know what you mean by integrating into one database. Do you mean changing three projects into a common database, or do you mean putting three databases on one machine?
If it’s the former, I don’t feel good about it, because since there are three projects, the databases should be separated. Putting them in one database will cause conflicts in table names, etc., and it will be very troublesome to modify.
If it is the latter, I don’t know if each of your projects is in the form of 1 master and n slaves. If so, you can first use a slave machine to merge the three data slaves together, and then perform the master From the switch, when switching the main database to the merged machine, the configuration differences of each previous server must also be taken into consideration.

Ty80

Program integration, triggers, stored procedures, foreign keys, whatever you want

巴扎黑

The answer still needs research

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!