April 5th, 2013, 06:26 AM
Configure database name in shared hosting environment
I am migrating my current website to a new shared hosting environment. Unfortunately, the new environment creates a prefix to my database name, for eg abc to username_abc.
Is there anyway I can config in my new environment to point to username_abc without the need to go to every PHP script to change the database name?
April 5th, 2013, 07:34 AM
If you change the name of the database, you will have to change the name in the PHP script.
You don't have all the database information stored in one file?
If you have the database name stored (hard-coded) in multiple file, there is not much to do than start a search and replace.
Don't know which tools you are using, but with Notepad++ you can open several files and do an search and replace all.
April 7th, 2013, 01:48 AM
Thanks Mr Fujin for your help. Actually the appln was outsourced so I was struggling to understand the codes and worse still, it was written in a foreign language.
Anyway, I got it figured out.