Database connect help

Discussion in 'PHP' started by vtopaloff, Aug 5, 2009.

  1. #1
    I recently uploaded Lyricing CMS on my site, and I have big problem with connecting it to the mysql database. I tried to follow the instructions that are given but it still didnt work. So I'm asking someone if could help me doing that, and I'll put link to his site in the footer.
    Thanks in advance.

    database name : LYRICS
    database password : MUSIC

    Please replace with this information what i have to do. Thanks

    Here are the instructions :
    
    4. Open config.php and on lines 5 to 6 edit the database details to yours.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    5. Open /admin/config and again edit lines 5 to 6 with your database details.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    6. Open /admin/connect.php and edit lines 4 to 5 with your database details.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    7. Open rss.php and change the details from http://www.yourdomain.com/ to your own domain.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    8. Open mysql.class.php and edit lines 7 to 10 with your own database information.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    9. Open .htaccess and edit the domain from http://www.yourdomain.com to your own domain.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    10. Open index.php and find and replace relations to http://www.yourdomain.com with your own domain.
    
    ------------------------------------------------------------------------------------------------------------------------
    
    11. Open searchresults.php and find relations fromthe domain from http://www.yourdomain.com and then change it to your own 
    domain.
    
    HTML:
    Config 3,4,5 and 6 line :

    //mysql_connect("localhost","root","lol");
    //mysql_select_db("lyrics");
    mysql_connect("localhost", "root", "root");
    mysql_select_db("db")
    HTML:
    ;

    admin/config is the same

    connect lines are

    mysql_connect("localhost", "root", "root");
    mysql_select_db("db");
    HTML:
    mysql.class :

    $db = mysql_connect("localhost", "root", "*****");
    mysql_select_db("lyrics", $db);
    
    HTML:
     
    vtopaloff, Aug 5, 2009 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    There are still two pieces of information missing, the host name and the database username. Anyhow, here is what you need to change - for all three files:

    
    mysql_connect("HostName", "DatabaseUsername", "DatabasePassword");
    mysql_select_db("DatabaseName");
    
    PHP:
     
    ThePHPMaster, Aug 5, 2009 IP
  3. EverestTech

    EverestTech Well-Known Member

    Messages:
    554
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #3
    did you use the same username, password and database name on all the mysql_connect and mysql_select_db functions

    can you post your php error output
     
    EverestTech, Aug 5, 2009 IP
  4. vtopaloff

    vtopaloff Well-Known Member

    Messages:
    294
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #4
    http://lyricz.us/ Here can be seen the error. I tried to do it like ThePHPMasted said but it's still not working. :(
     
    vtopaloff, Aug 6, 2009 IP
  5. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well, obviously something is wrong in you php config. I see you used a user named "root". that's probably incorrect.
     
    premiumscripts, Aug 6, 2009 IP
  6. EverestTech

    EverestTech Well-Known Member

    Messages:
    554
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    140
    #6
    in all config/connect and mysql.classs

    replace first root with your database username and second root with your password

    like msyql_connect("localhost", "username", "password");

    in

    mysql_connect("localhost", "root", "root");


    and replace db with your database name in

    mysql_select_db("db");
     
    EverestTech, Aug 6, 2009 IP