I have 2 hosting lets say hosting A and Hosting B.
The application using CI inside Hosting A and database too
for some reason i want upload my application to hosting B but error because database connection. how i can connect my application in hosting B but the database in hosting A.
what should i change in my connection string ?
2
Answers
You need to change the hostname to the IP address of hosting A where your database is hosted. Also, you need to give certain permissions on Hosting A, in order for other servers to access that database.
For connecting to database at hosting a
You can directly use the ip of host a and used in codeigniter application at host b.
Its depend on hosting provider whether database can accept connections from other host or not. For this contact the hosting a.
Thanks