John T Posted June 5, 2014 Share Posted June 5, 2014 Hi, I am changing my ISP and need to import my databases. Do I I have to create a new datarbase or can I change my database name to import? My new host has a different database prefix ie: -web147xxxxxxxx My old one was arewene1_wor1. Many thanks. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/ Share on other sites More sharing options...
Ch0cu3r Posted June 5, 2014 Share Posted June 5, 2014 Yes you'll first need to create the new database. Then modify your script to use the new database. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1481932 Share on other sites More sharing options...
John T Posted June 5, 2014 Author Share Posted June 5, 2014 Thanks for the quick reply. I did not think it would be simple! Could you please tell me which scripts I need to modify as I am a complete numpty with regard to this? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1481934 Share on other sites More sharing options...
Ch0cu3r Posted June 5, 2014 Share Posted June 5, 2014 No not really as I do not know what script your sites uses. Usually the database credits are stored in a global config script for your application. You'll need to go through your sites files and find that file, open it and change the database credentials to the the ones supplied by your host. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1481937 Share on other sites More sharing options...
Zane Posted June 5, 2014 Share Posted June 5, 2014 It might also help to do a full database dump... then import it into your new database like you mentioned in your OP. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1481938 Share on other sites More sharing options...
John T Posted June 6, 2014 Author Share Posted June 6, 2014 Thanks for the replies. I have a download of both my databases also a complete site download and will have a look later today (Wife says I have jobs to do today) Thanks again I will report back. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1482009 Share on other sites More sharing options...
Solution John T Posted June 7, 2014 Author Solution Share Posted June 7, 2014 OK all jobs done! I opened my sql file in Notepad++ and renamed it to suit the new database provided by my new host, edited some lines to also match and, hey presto it worked. I was expecting "could not connect to database" but no. A couple of things did not pull over but too few to worry about. Thanks guys for the advice. Quote Link to comment https://forums.phpfreaks.com/topic/288993-changing-isp/#findComment-1482167 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.