Could not connect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pitgo
    New Member
    • Apr 2010
    • 11

    Could not connect

    Hello
    Ask for help
    After correct script install on subdomain and correct particular database , www.search.mydo main.com i get this error ==>

    Could not connect: Access denied for user 'yourdb_usernam e'@'localhost' (using password: YES)

    pitgo
  • nouras
    New Member
    • Apr 2010
    • 15

    #2
    the error is in your password

    Comment

    • pitgo
      New Member
      • Apr 2010
      • 11

      #3
      Dear nouras

      which password you main ? if Mysql , i put correct password , i should primary password register other particular for subdomain password ? if particular ,i typ correct.

      pitgo

      Comment

      • nouras
        New Member
        • Apr 2010
        • 15

        #4
        i think you work local.
        i don't know about subdomain,but when work local my root hasn't password
        so if i type a space in the password this error appear.
        and when upload to the subdomain,i have a username and password so i change the password and username after upload because it is different...

        Comment

        • pitgo
          New Member
          • Apr 2010
          • 11

          #5
          Before script upload i make extra database for my subdomain, why should i again change password ?

          pitgo

          Comment

          • nouras
            New Member
            • Apr 2010
            • 15

            #6
            I mean :: make sure that your password in the files (when connect to DB).
            this code i mean
            ((this local))
            Code:
             $db->db_HOST = "localhost";
                $db->db_USER = "root";
                $db->db_PASS = "";
                $db->database = "arttech";
            after upload
            Code:
                $db->db_USER = "user";
                $db->db_PASS = "user123";
                $db->database = "arttech";
            check your code ...........
            i think the error from this code...

            Comment

            • Markus
              Recognized Expert Expert
              • Jun 2007
              • 6092

              #7
              Are you positive your username and password are correct?

              Comment

              • pitgo
                New Member
                • Apr 2010
                • 11

                #8
                Sorry i am beginners ,Where should I check ? please explain me exact

                Comment

                • Markus
                  Recognized Expert Expert
                  • Jun 2007
                  • 6092

                  #9
                  Originally posted by pitgo
                  Sorry i am beginners ,Where should I check ? please explain me exact
                  Check the details you pass to mysql_connect() or whatever function you use to establish a connection to your database. Can you connect to your database from the command-line/terminal?

                  Comment

                  • pitgo
                    New Member
                    • Apr 2010
                    • 11

                    #10
                    sorry i speak german, my english is not god

                    No I have never made database connect.

                    Comment

                    • pitgo
                      New Member
                      • Apr 2010
                      • 11

                      #11
                      Originally posted by Markus
                      Are you positive your username and password are correct?
                      i made first extra database then i upload srcipt
                      after script install , script ask me not database details

                      Comment

                      • pitgo
                        New Member
                        • Apr 2010
                        • 11

                        #12
                        Originally posted by Markus
                        Are you positive your username and password are correct?
                        this is my correcte database details

                        Database: admin_box
                        Host: localhost
                        Username: admin_search
                        Password: 221133

                        Comment

                        • Atli
                          Recognized Expert Expert
                          • Nov 2006
                          • 5062

                          #13
                          Originally posted by pitgo
                          this is my correcte database details

                          Database: admin_box
                          Host: localhost
                          Username: admin_search
                          Password: 221133
                          Hey.

                          If that is correct, this should print: "Success!":
                          [code=php]<?php
                          $dbLink = new mysqli('localho st', 'admin_search', '221133', 'admin_box');
                          if(mysqli_conne ct_errno()) {
                          echo "Failed! Error: ", mysqli_connect_ error();
                          }
                          else {
                          echo "Success!";
                          }
                          ?>[/code]
                          What does this print?

                          Comment

                          • pitgo
                            New Member
                            • Apr 2010
                            • 11

                            #14
                            Originally posted by Atli
                            Hey.

                            If that is correct, this should print: "Success!":
                            [code=php]<?php
                            $dbLink = new mysqli('localho st', 'admin_search', '221133', 'admin_box');
                            if(mysqli_conne ct_errno()) {
                            echo "Failed! Error: ", mysqli_connect_ error();
                            }
                            else {
                            echo "Success!";
                            }
                            ?>[/code]
                            What does this print?
                            Where should I check ? please explain me exact

                            Comment

                            • Atli
                              Recognized Expert Expert
                              • Nov 2006
                              • 5062

                              #15
                              Put the code I posted into a new PHP file, open it in a browser, and see what it says.

                              Comment

                              Working...