Problem with Moving Joomla Site

Discussion in 'Joomla' started by nICEsHARE, Nov 17, 2009.

  1. #1
    Today I moved my joomla site to another hosting. All back up and done fine except when I tried opening, I got this:

    Database Error: Unable to connect to the database:Could not connect to MySQL
    Code (markup):
    I look at my configuration.php, but this seems different from when googled the solution:

    <?php
    class JConfig {
    	var $offline = '0';
    	var $editor = 'tinymce';
    	var $list_limit = '20';
    	var $helpurl = 'http://help.joomla.org';
    	var $debug = '0';
    	var $debug_lang = '0';
    	var $sef = '1';
    	var $sef_rewrite = '1';
    	var $sef_suffix = '1';
    	var $feed_limit = '10';
    	var $feed_email = 'site';
    	var $secret = 'xxx';
    	var $gzip = '1';
    	var $error_reporting = '-1';
    	var $xmlrpc_server = '0';
    	var $log_path = '/logs';
    	var $tmp_path = '/tmp';
    	var $live_site = '';
    	var $force_ssl = '0';
    	var $offset = '-8';
    	var $caching = '0';
    	var $cachetime = '15';
    	var $cache_handler = 'file';
    	var $memcache_settings = array();
    	var $ftp_enable = '0';
    	var $ftp_host = 'xxx';
    	var $ftp_port = '21';
    	var $ftp_user = 'xxx';
    	var $ftp_pass = 'xxx';
    	var $ftp_root = '';
    	var $dbtype = 'mysql';
    	var $host = 'localhost';
    	var $user = 'xxx';
    	var $db = 'xxx';
    	var $dbprefix = 'jos_';
    	var $mailer = 'mail';
    	var $mailfrom = 'xxx';
    	var $fromname = 'xxx';
    	var $sendmail = '/usr/sbin/sendmail';
    	var $smtpauth = '0';
    	var $smtpuser = '';
    	var $smtppass = '';
    	var $smtphost = 'localhost';
    	var $MetaAuthor = '1';
    	var $MetaTitle = '1';
    	var $lifetime = '15';
    	var $session_handler = 'database';
    	var $password = 'xxx';
    	var $sitename = 'xxx';
    	var $MetaDesc = 'xxx';
    	var $MetaKeys = 'xxx';
    	var $offline_message = 'This site is down for maintenance. Please check back again soon.';
    }
    ?>
    Code (markup):
    I also tried adding $pass, but still not working. I also tested using this suggestion - working fine:
    <?php
    $host = 'localhost';
    $user = 'looblog1_jo151';
    $pass = 'jo151';
    $db = 'looblog1_jo151';
    
    //Don't change below here
    $conn = mysql_connect($host, $user, $pass);
    mysql_select_db($db, $conn);
    echo '<hr />anything above this linebreak is BAD!';
    Code (markup):
     
    nICEsHARE, Nov 17, 2009 IP
  2. nICEsHARE

    nICEsHARE Active Member

    Messages:
    280
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    problem solved.

     
    nICEsHARE, Nov 17, 2009 IP
  3. chetanmadaan

    chetanmadaan Active Member

    Messages:
    325
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
  4. davidyxf

    davidyxf Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That's a good tool, but need some adjustment
     
    davidyxf, Nov 25, 2009 IP
  5. Styling Designs

    Styling Designs Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Just copy paste mysql database and upload Joomla files to root?

    Where do you set the new server settings?

    P.s. Good luck with the new site.

    Wouter
     
    Styling Designs, Nov 25, 2009 IP