Announcement

Collapse
No announcement yet.

MySQL Host Address

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

  • MySQL Host Address

    I am trying to connect to mysql server through SQLyog to access the database created from CPanel. Yet I was required to enter MySQL host Address. I tried the 75.126.169.141 which is the FTP address of our vodahost server but it did not work. Can anyone tell me where I can find MySQL Host Address?

    Many Thanks.

    Ted
    www.naturalstage.com

  • #2
    Re: MySQL Host Address

    Usually most programs that remotely connect to your database will use, as host, " www.yourdomain.com " . However, to be able to remotely connect, you will need to add your ISP's host to the list of allowed hosts. If you have a static IP address (i mean the one of your ISP) that's easy, but if you have a dynamically changing IP address, which changes each time you connect / disconnect fron the internet, that would be a problem.

    Anyway, have a look at http://www.webyog.com/faq/content/16...at-an-isp.html
    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


    • #3
      Re: MySQL Host Address

      Hi,
      I have the same problem.
      I have been trying to connect a MYSQL database to my voda host cpannel.
      what you just said sounds good but how would I get my ISP's host?

      Comment


      • #4
        Re: MySQL Host Address

        I meant my voda host database

        Comment


        • #5
          Re: MySQL Host Address

          Not sure what you mean. Your VH host, as i explained will simply be www.yourdomain.com . Your ISP's host (you will need it to add it to the list of allowed hosts) can be easily seen in http://www.ipchicken.com/ under Advanced, Name address.
          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


          • #6
            Re: MySQL Host Address

            Thank you for the quick reply, Navaldesign. But I think what I want to find out is - I have created a mysql datase through CPanel which I believe is lcoated on my server and I like to modify the database. Where do I find out my MySql host address in order to make the connection? Thanks again.

            www.naturalstage.com

            Comment


            • #7
              Re: MySQL Host Address

              Ok, you are NOT looking for your host then, you want to reach your database to work with it. Go in your CP, MySQL section, and in the bottom of the page you will find a link to phpMyAdmin. Unless you have the latest Cpanel version with the new skin. In that case, go in your CP, and in the MySQL section there is a direct link to phpMyAdmin from Control Panel's home page.

              In both cases, the link to phpMyAdmin will lead you to it, and you can manage your database from there.

              If, instead of the above, you meant remote connection, my post above stands: VH doesn't have a specific address for the MySQL server, you simply give in your script your domain name.
              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


              • #8
                Re: MySQL Host Address

                I didn't know the existence of the link until you told me. Thank you very much. I think I have found what I needed.

                Comment


                • #9
                  Re: MySQL Host Address

                  When following the forum I did as was suggested:
                  Used my domain name as the local host. I received the following error from the SQL.....

                  ERROR: Unknown Punctuation String @ 1
                  STR: <?
                  SQL: <?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "Martech-Inc.biz ";

                  When I used my localhost instead I received the following error....

                  ERROR: Unknown Punctuation String @ 1
                  STR: <?
                  SQL: <?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-*-**.hsd1.mn.comcast.net";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-***-**.hsd1.mn.comcast.net";<?
                  // Replace the variable values below
                  // with your specific database information.
                  $host = "c-**-*-***-**.hsd1.mn.comcast.net";

                  Neither of the above worked in setting up the file to the dbConfig.php !!!

                  What am I doing wrong?

                  Ram_Industries
                  Robert Montgomery
                  Ram_Industries
                  Robert A. Montgomery
                  Ram-Industries@comcast.net
                  http://Martech-Inc.biz

                  Comment


                  • #10
                    Re: MySQL Host Address

                    How are you trying to connect to the MySQL server ? through a desktop or a server installed application ?
                    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


                    • #11
                      Re: MySQL Host Address

                      Thru desktop into the cPanel .......

                      I logged into the cPanel and clicked on the mySQL icon then went into the db from the next page or there abouts.

                      Ram_Industries
                      Robert Montgomery
                      Ram_Industries
                      Robert A. Montgomery
                      Ram-Industries@comcast.net
                      http://Martech-Inc.biz

                      Comment


                      • #12
                        Re: MySQL Host Address

                        I also watched the tutorial in regards to working in the myPHPadmin page but still could not get this to work.

                        Originally posted by Ram_Industries View Post
                        Thru desktop into the cPanel .......

                        I logged into the cPanel and clicked on the mySQL icon then went into the db from the next page or there abouts.

                        Ram_Industries
                        Robert Montgomery
                        http://Martech-Inc.biz
                        Ram_Industries
                        Robert A. Montgomery
                        Ram-Industries@comcast.net
                        http://Martech-Inc.biz

                        Comment


                        • #13
                          Re: MySQL Host Address

                          In addition this is the type of code I started working with.

                          <?
                          // Replace the variable values below
                          // with your specific database information.
                          $host = "localhost";
                          $user = "UserName";
                          $pass = "Password";
                          $db = "dbName";

                          // This part sets up the connection to the
                          // database (so you don't need to reopen the connection
                          // again on the same page).
                          $ms = mysql_pconnect($host, $user, $pass);
                          if ( !$ms )
                          {
                          echo "Error connecting to database.\n";
                          }

                          // Then you need to make sure the database you want
                          // is selected.
                          mysql_select_db($db);

                          What part of the program am I missing?

                          I believe I will again have this issue when I set the code for the Registration page as well, since I am supposed to create a file with the code ...... But would I create the file in the root-dir or from someplace else?

                          Ram_Industries
                          Robert Montgomery
                          Ram_Industries
                          Robert A. Montgomery
                          Ram-Industries@comcast.net
                          http://Martech-Inc.biz

                          Comment


                          • #14
                            Re: MySQL Host Address

                            Ok, the answer to my question is that you are connecting to the database through a php script installed on the server.
                            Since what you are trying to do is installation of this script, the steps to follow are:

                            1. Create a database in your CP. CP > MySQL Databases > Add New Database (type the name you want your database to have). Please note that the name that CP creates for the database is NOT what you have typed, but cpusername_dbname where dbname is what you have called your database, and cpusername your own CP username. They are separated by an underscore.
                            2. In the same page, create a user for this database, let's suppose that you have called the user robert and you have provided, as password, ABCrobert . Please note that CP creates a user, but it names the user cpusername_robert. (as for the database name)
                            3. ADD this user to the specific database, or he has no access. This is done through the Add user to database dropdowns (one for users, one for DBs, select user and satabase and press ADD USER).

                            4. Now, find the file in your script that contains the database connection details. Since the script runs on your server, you have the follwing details:
                            Host = localhost
                            User = cpusername_robert
                            Password = ABCrobert
                            DB name = whatever you have called your database

                            Once you have changed this file, in your computer, upload the edited file in the corresponding folder of your site.

                            At this point, your script should have another part which is also necessary for it to work, and this is the installation wizard, if it exists.

                            If it exists (usually it should be a file called "install.php , or setup.php or something similar) by typing in your browser http://www.yourdomain.com/scriptfolder/install.php the script should automatically create in the database all necessary tables. If this is a serious script, it should also ask you, before creating the tables, the desired username and password (necessary for Administrator login). It will also, if necessary, populate some of the tables with some default values, and at the end, it will give you a succesful installation message.
                            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


                            • #15
                              Re: MySQL Host Address

                              Naval:

                              When I tried to do as you said, I got the following error:

                              #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$dbh=mysql_connect ("localhost", "wgnfqog_RamIndus", "This is where I typed my password") or die ('I ca' at line 1

                              Ram_Industries
                              Robert Montgomery
                              http://Martech-Inc.biz
                              Ram_Industries
                              Robert A. Montgomery
                              Ram-Industries@comcast.net
                              http://Martech-Inc.biz

                              Comment

                              Working...
                              X