1

I have two websites; website1.com and website2.com. On website1 I have database with customer information and a neat CMS. Now I would like to make a registration form on website2 and insert that information in the database on website1.

Is this possible? Can I simply use mysql INSERT INTO~? Or do I need to use something else?

Linkjuice57
  • 3,123
  • 5
  • 22
  • 23

2 Answers2

2

You can connect remotely to another server:

mysql -h host_name -D db_name -ppassword -c "insert into ..."
Bohemian
  • 389,931
  • 88
  • 552
  • 692
0

You need to allow MySQL remote connections if your websites are on different machines. Securing Remote MySQL

In both cases (remote or local), the method is the same: open a connection to website1's database and use INSERT INTO.

Community
  • 1
  • 1
Nikola K.
  • 6,963
  • 13
  • 28
  • 39