skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. For connecting to database at hosting a

    1. You can directly use the ip of host a and used in codeigniter application at host b.

    2. Its depend on hosting provider whether database can accept connections from other host or not. For this contact the hosting a.

    Thanks

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search