huntersj78 Posted November 7, 2009 Share Posted November 7, 2009 Now I know I may asking the lamest of questions, but I have two domains. www.dmj.fm (the new one) and www.discoverymusic.jp (the one I am leaving). I still have a couple of links going to the old domain because those run on a database. I tried to just move the files to the new server/domain and was successful except that if I move the two database files I get this error: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dmj_2'@'localhost' (using password: YES) in /virtual/story/public_html/www.dmj.fm/jc/cms/cms_class.php on line 15 Do I have to change something in the cms_class.php or do I have to edit the database? Quote Link to comment https://forums.phpfreaks.com/topic/180647-transferring-a-database-to-a-new-server/ Share on other sites More sharing options...
PravinS Posted November 7, 2009 Share Posted November 7, 2009 You need to create database on new server and upload the database from old server. Create database dump(.sql) file from old server and upload it to new server. Then in cms_class.php page update username, password, database name of new server. Quote Link to comment https://forums.phpfreaks.com/topic/180647-transferring-a-database-to-a-new-server/#findComment-953051 Share on other sites More sharing options...
ngreenwood6 Posted November 7, 2009 Share Posted November 7, 2009 well for the most part your suggestion is correct pbs, except the updating the cms_class.php. it seems to me as if hunters is using some kind of cms. the cms_class.php file may not hold the database settings it is just trying to connect to the database in that file which is why it is showing the error there. so what you need to do is find out where your database connections are coming from. Usually these are put in some kind of config file. if you find the config file just update it with your database settings for the new server. optionally another way you could do this which would be easier is to just simply create the same user and password on the new server. that would make all your connections correct without having to change config files. That is assuming that the databases on each server are configured as localhost and not pointing to a different domain. Quote Link to comment https://forums.phpfreaks.com/topic/180647-transferring-a-database-to-a-new-server/#findComment-953059 Share on other sites More sharing options...
huntersj78 Posted November 7, 2009 Author Share Posted November 7, 2009 I have almost got it. This stuff is so confusing. I moved the log and creation files to the new server and changed the password. Still not right though. here is one of the old pages on the old site. http://www.discoverymusic.jp/jc/message.html notice the comments in place. but on the new site: http://www.dmj.fm/jc/message.html the comments are missing. I knew I should of went to MIT instead of Humboldt. lol Quote Link to comment https://forums.phpfreaks.com/topic/180647-transferring-a-database-to-a-new-server/#findComment-953077 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.