0

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 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.