How to set up MySQL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • WSBlue
    Brigadier General

    • Apr 2006
    • 1415

    How to set up MySQL?

    Hi!
    I can't find tutorial for MySQL and thus make me don't really know how to ask questions but please let me try to ask these:
    1. I opened control panel . created MySQL Database .
    after created, in the table under:
    Database show Name that I created, but don't show User name even already added user. Why?


    And I try to set up installation for Polling through browser and this is what I get:
    Warning: include(conf.php) [function.include]: failed to open stream: No such file or directory in /home/rbnwr/public_html/iwork/setup.php on line 16

    Warning: include(conf.php) [function.include]: failed to open stream: No such file or directory in /home/rbnwr/public_html/iwork/setup.php on line 16

    Warning: include() [function.include]: Failed opening 'conf.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rbnwr/public_html/iwork/setup.php on line 16

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'rbnwr'@'localhost' (using password: NO) in /home/rbnwr/public_html/iwork/setup.php on line 17
    MySQL Error: Unable to connect to database please check that you have provided the correct
    Database Login username
    Database Login Password

    May I know, why is it being denied and how to correct and make changes below?

    <?php

    //Make the changes below
    $db_host = "localhost"; //It is mostly localhost may not need to change it.

    $db_name = "banner"; //Name of your database

    $database_user = "user"; //Login name of your MYSQL database

    $database_pass = "test"; //Password of your MYSQL Database

    ?>

    Thank you.
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: How to set up MySQL?

    You first create the database.
    Then you create user / password.

    Third, you MUST add the created user to the specific database, AND set his permissions.

    Did you do ALL of the above before trying to install your script ?

    Error messages: it is CLEAR from the message that the "config.php" file doesn't exist. The only possible reason for this is that it has not been uploaded.
    Furthermore, it is obvious that you should have edited this file with the specific details of the DB/user/pass you created and THEN upload it to the necessary folder.
    Since you haven't done so, the script tries to connect to the MySQL server but fails because it doesn't have the necessary details (because "config.php" is missing).
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • WSBlue
      Brigadier General

      • Apr 2006
      • 1415

      #3
      Re: How to set up MySQL?

      You first create the database.
      Then you create user / password.

      Third, you MUST add the created user to the specific database, AND set his permissions.

      Did you do ALL of the above before trying to install your script ?
      Yes, I have just done all these.

      Error messages: it is CLEAR from the message that the "config.php" file doesn't exist. The only possible reason for this is that it has not been uploaded.
      Furthermore, it is obvious that you should have edited this file with the specific details of the DB/user/pass you created and THEN upload it to the necessary folder.
      Since you haven't done so, the script tries to connect to the MySQL server but fails because it doesn't have the necessary details (because "config.php" is missing).
      Yes, I have just uploaded with the script like this:

      <?php
      //Make the changes below
      $db_host = "localhost"; //It is mostly localhost may not need to change it.
      $db_name = "banner"; //rbnwrmty_examplesurvey
      $database_user = "user"; //rbnwrmty_example
      $database_pass = "test"; //12345678
      ?>

      ($database_pass = "test"; //12345678
      Shall I change the "test" and 12345678 is it for password that I created at MySQL database?)

      And now, this is what I get:
      Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: YES) in /home/rbnwrmty/public_html/iwork/setup.php on line 17
      MySQL Error: Unable to connect to database please check that you have provided the correct
      Database Login username
      Database Login Password

      Please advise what I am missing?

      Thank you.

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: How to set up MySQL?

        <?php
        //Make the changes below
        $db_host = "localhost"; //It is mostly localhost may not need to change it.
        $db_name = "rbnwrmty_examplesurvey";
        $database_user = "rbnwrmty_user"; //Usually this is cpanel_username_user where user is the user you created
        $database_pass = "real_password";
        ?>
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • WSBlue
          Brigadier General

          • Apr 2006
          • 1415

          #5
          Re: How to set up MySQL?

          George,
          I have got this : Setup successfully completed!
          Thanks so much.
          PJR

          Comment

          • WSBlue
            Brigadier General

            • Apr 2006
            • 1415

            #6
            Re: How to set up MySQL?

            I have tried to set up a test poll.

            Poll has been made successfully.
            The ID for this poll is: 1268738883
            Please use this ID to display the poll.

            May I ask from here:
            How to put this into my web and
            Where or How can see this from my web?
            Thank you

            Comment

            • WSBlue
              Brigadier General

              • Apr 2006
              • 1415

              #7
              Re: How to set up MySQL?

              Originally posted by WSBlue View Post
              I have tried to set up a test poll.

              Poll has been made successfully.
              The ID for this poll is: 1268738883
              Please use this ID to display the poll.

              May I ask from here:
              How to put this into my web and
              Where or How can see this from my web?
              Thank you
              OK. I have got it .
              I forgot to add the poll number to the script.
              Thank you.

              Comment

              • apoles
                Private

                • Mar 2010
                • 2

                #8
                Re: How to set up MySQL?

                I have created database [name] and database user.
                The question is
                How to define the architecture
                How to define fields
                How to input data

                PS - I already have the database assembled using MS Access. It has 5000 records each record 30 fields. Now I want visitors to my page to consult.
                I appreciate any help.

                apoles
                devitajr******.com

                Comment

                • littleAngel89
                  Private

                  • Apr 2010
                  • 2

                  #9
                  Re: How to set up MySQL?

                  I think that first you have to create a new user
                  THen log on as that user
                  Then create databases...

                  If you don't log in as new user, then you will be root as default

                  Comment

                  Working...
                  X