7 Replies Latest reply on Jun 2, 2009 8:59 PM by 843789

    help with creating a mysql database

    800296
      I am required to deliver a CRUD application using a mysql database. How do I know what the userame or password are on the host? is there a default value I can use?
        • 1. Re: help with creating a mysql database
          843789
          Yucca wrote:
          How do I know what the userame or password are on the host?
          Talk to the DBA. The proper values should be specified in your application's configuration.

          ~
          • 2. Re: help with creating a mysql database
            800296
            yawmark wrote:
            Yucca wrote:
            How do I know what the userame or password are on the host?
            Talk to the DBA. The proper values should be specified in your application's configuration.

            ~
            Thanks but I was not clear enough...
            Its an assignment project and not real life project...
            Should I just enter "root" and "root" as values?
            • 3. Re: help with creating a mysql database
              843789
              Is this a web app? Then you configure the DataSource in the server (database url, username, password...). Your code just needs the name of the data source.

              If this is just a simple application, put the config stuff (database url, username, password...) in a configuration file (*.xml or *.properties) so that whoever you give this to can supply the information.
              • 4. Re: help with creating a mysql database
                843789
                Yucca wrote:
                Thanks but I was not clear enough...
                Its an assignment project and not real life project...
                Should I just enter "root" and "root" as values?
                [http://dev.mysql.com/tech-resources/articles/mysql_intro.html]
                [http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html]
                [http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html#connector-j-examples-connection-drivermanager]

                ~
                • 5. Re: help with creating a mysql database
                  800296
                  BigDaddyLoveHandles wrote:
                  Is this a web app? Then you configure the DataSource in the server (database url, username, password...). Your code just needs the name of the data source.

                  If this is just a simple application, put the config stuff (database url, username, password...) in a configuration file (*.xml or *.properties) so that whoever you give this to can supply the information.
                  Yes but my question was aimed at the examiner. How will he be able to test it without specifying the values I used as configuration values? Should I just inform him? I thought there may be a default password and username for all mysql servers for testing purposes?
                  • 6. Re: help with creating a mysql database
                    843789
                    Yucca wrote:
                    BigDaddyLoveHandles wrote:
                    Is this a web app? Then you configure the DataSource in the server (database url, username, password...). Your code just needs the name of the data source.

                    If this is just a simple application, put the config stuff (database url, username, password...) in a configuration file (*.xml or *.properties) so that whoever you give this to can supply the information.
                    Yes but my question was aimed at the examiner. How will he be able to test it without specifying the values I used as configuration values? Should I just inform him? I thought there may be a default password and username for all mysql servers for testing purposes?
                    This seems silly. You're not allowed to ask, or say "I've defined the following property file, etc... Is this adequate?"
                    • 7. Re: help with creating a mysql database
                      843789
                      I thought there may be a default password and username for all mysql servers for testing purposes?
                      Challenge yourself to consider why that might be not such a hot idea.

                      ~