Noob needs mysql help.

Discussion in 'MySQL' started by mistermix, Dec 3, 2006.

  1. #1
    I recently purchased a site that runs on a mysql db. I transfered the files to my host, set up a new db, imported the old db and changed the nameservers to my new host.

    the site is arcadevoid .com and does not load.

    What could this be?
     
    mistermix, Dec 3, 2006 IP
  2. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #2
    It looks to me as though you're not connecting to the DB, in other words, check your code connecting to it. Why not paste it here.

    Here's how I connect to my databases:

    
    <?
    			
    		// Connect to DB
    			
    		$hostname = "localhost";
    		$mysql_login = "brum_admin";
    		$mysql_password = "password";
    		$database = "brum_database1"; 
    
    		// connect to the database server
    
    		if (!($db = mysql_pconnect($hostname, $mysql_login , $mysql_password))){
    		die( "Can't connect to database server." );    
    		}else{
    
    		// select a database
    
    		if (!(mysql_select_db("$database",$db))){
    		die( "Can't connect to database." );
    		}
    		}
    
    ?>
    
    PHP:
    You can of course connect successfully with much shorter code if you wish.
     
    BRUm, Dec 3, 2006 IP
  3. SFOD_D223

    SFOD_D223 Peon

    Messages:
    4,512
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not to throw a different wrench in the mix but did you confirm versions of mysql and linking pages version (PHP 4.*) from your host? Basically make sure they are compatible.
     
    SFOD_D223, Dec 3, 2006 IP
  4. pixads

    pixads Well-Known Member

    Messages:
    2,015
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    145
    #4
    find the config file and make sure the DB configuration is correct
     
    pixads, Dec 4, 2006 IP
  5. mistermix

    mistermix Active Member

    Messages:
    2,326
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Thanks for your responses. Here is some more info.

    This is the top of the database i'm trying to import:

    This is the config.php file that I was told to input my new database details into:

    The text in red is what I altered.

    My host uses PHP version 5.1.2 and has the option of using version 4.4.2.

    :confused:
     
    mistermix, Dec 4, 2006 IP
  6. pixads

    pixads Well-Known Member

    Messages:
    2,015
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    145
    #6
    is everything OK now
    your site seems to be up
     
    pixads, Dec 5, 2006 IP
  7. mistermix

    mistermix Active Member

    Messages:
    2,326
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    90
    #7
    Yeah its up. There were some other files that I needed to input my db details into.

    thanks
     
    mistermix, Dec 6, 2006 IP
  8. AAZZ

    AAZZ Active Member

    Messages:
    1,612
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    90
    #8
    Maybe pasting your database name, user, and password is not a good idea. lol
     
    AAZZ, Dec 6, 2006 IP
  9. mistermix

    mistermix Active Member

    Messages:
    2,326
    Likes Received:
    85
    Best Answers:
    0
    Trophy Points:
    90
    #9



    i dont think anybody posted their password.

    ps. whats your password? ;)
     
    mistermix, Dec 6, 2006 IP
  10. Taurian

    Taurian Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    post some error messages
     
    Taurian, Dec 6, 2006 IP