can anyone help please, cant connect to db

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    can anyone help please, cant connect to db

    i have tried several scripts, the latest i tried now with riderz's simple php forum.
    no matter how i do it, i just cant get scrits to connect to the datbase. i follow instructions to the letter, but to no avail, i added a db user to the db i want to use, edited the files, config etc, with the db username and password, but i just keep on getting erroer
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'moboholi_conrad'@'localhost' (using password: YES) in /home/mobiholi/public_html/main_forum.php on line 9
    cannot connect

    should i change in the script where it show localhost to something else? please, i would appreciate it if someone can help me
    Why cry for a soul set free?

    #2
    Are you using a free or paid server that could be your problem.
    BakGat
    Code:
    class Counter {
    public:
      void Count();
      int  ReadDisplay();
    private:
      int  CurrentCount;
    };








    Back up my hard drive? How do I put it in reverse?
    My Community
    BakGat
    sigpic

    Comment


      #3
      Paid server should look like this

      PHP Code:
      $dbname "name_name "//change to your mysql database name
      $dbhost "localhost"//database host name
      $dbuser "name_name2 ";
      $dbpass "123456 "
      Name is whatever you called your databases

      Free Hosting

      PHP Code:
      $dbname "name_name "//change to your mysql database name
      $dbhost "http://sql.yoursqldomain.com "//database host name
      $dbuser "name_name2 ";
      $dbpass "123456"
      Hope you get the picture
      BakGat
      Code:
      class Counter {
      public:
        void Count();
        int  ReadDisplay();
      private:
        int  CurrentCount;
      };








      Back up my hard drive? How do I put it in reverse?
      My Community
      BakGat
      sigpic

      Comment


        #4
        [QUOTE=bOrN2pwn;48696]Paid server should look like this

        PHP Code:
        $dbname "name_name "//change to your mysql database name
        $dbhost "localhost"//database host name
        $dbuser "name_name2 ";
        $dbpass "123456 "
        Name is whatever you called your databases

        Free Hosting

        PHP Code:
        $dbname "name_name "//change to your mysql database name
        $dbhost "http://sql.yoursqldomain.com "//database host name
        $dbuser "name_name2 ";
        $dbpass "123456"
        Hope you get the picture[/QUOTE

        im using paid hosting, and the first one you show is how i did it, i even asked the host, and his reply was the same. what freak me out, i tried out some of the scripts one get in fantastico, and it install without any problem, and it work too. i cant even get a online/ hits script to connect. i checked out the php configuration on the cpanel, and i see there global regiter is set to off. can that be the problem? and how can i set it on, cause i see there the server administator can set it to on
        Why cry for a soul set free?

        Comment


          #5
          I think his on paid hosting.. try to go to your mysql databases.. and give permision to access your database

          first you must add user to database


          2nd assign privilege.. better to check all, and its done
          Last edited by huwad; 08.02.10, 03:41.

          Comment


            #6
            i did that too, yesterday i tried a smf forum, and it auto installed too without problem, and running without problem.
            But stuff that i want to connect dont wanna lol, its really freaking me out
            Why cry for a soul set free?

            Comment


              #7
              did you edit the two config.php already?
              Did I help you?
              You can help me too
              Your donations will help me finance my studies.

              Comment


                #8
                Yes i edited the config files on some scripts i wanted to try out, some lava scripts, one toplist, and now the online script, as well as the simple forum that riderz had here in tutorials. Nothing..
                Why cry for a soul set free?

                Comment


                  #9
                  first create table of some name and then put all details like database name, host, username, password in your config file. and remember, username and password of mysql database user may be different from your ACCOUNT/CP's un and pw.
                  Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

                  Comment


                    #10
                    Localhost function may not working in ur hosting. Findout the database server host address by go to ur database and replace it with 'localhost'. I think ur prob be solvd

                    Comment

                    Working...
                    X