Thread: MySql Host

Results 1 to 3 of 3
  1. #1 MySql Host 
    Registered Member
    Join Date
    Apr 2016
    Posts
    194
    Thanks given
    25
    Thanks received
    3
    Rep Power
    63
    Code:
    <?php
    
    * mysql database hostname
    */
    define("MYSQL_HOST", "localhost");
    /**
    * mysql username to connect to the database server
    */
    define("MYSQL_USERNAME", "sqlusername");
    /**
    * mysql password the password to connect to the database server
    */
    define("MYSQL_PASSWORD", "sqlpass");
    /**
    * mysql database the database name in which you have your vote table setup
    */
    define("MYSQL_DATABASE", "sqldatabase");
    /**
    * vote url this is the url which where users will be sent to on voting
    */
    define("VOTE_URL", "http://www.google.com/toplist/index.php?action=vote&id=102");
    /**
    * The number of hours between voting
    */
    define("VOTE_HOURS", 24);
    How should I be filling this part "define("MYSQL_HOST", "localhost");" out properly if I am using a webhost.

    I just want to implement Motivote really but no tutorial i go to makes sense. i can't find the webserver version on any of the links. If I could install motivote on my website i would.....
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Sep 2016
    Age
    23
    Posts
    517
    Thanks given
    405
    Thanks received
    186
    Rep Power
    0
    Hello, Raiga. I'd be happy to assist you with this.

    So what you'll want to start with is by logging into your webhost > Going to cPanel (or wherever you can make a MySQL database, not sure what webhosting you're using,) > Look for something like this

    Click "MySQL Database Wizard" > Create a Database > You will, then, insert that database name into the coding by replacing:

    Code:
    define("MYSQL_DATABASE", "sqldatabase");
    with
    Code:
    define("MYSQL_DATABASE", "your_database_name");
    After you create the database you will be prompted to create a Database Username and Password > You will enter THAT username and password into the following coding (so replace : )


    Code:
    define("MYSQL_USERNAME", "sqlusername");
    
    
    
    define("MYSQL_PASSWORD", "sqlpass");
    with
    Code:
    define("MYSQL_USERNAME", "your_username");
    
    
    
    define("MYSQL_PASSWORD", "your_password");
    With your hosting, you're going to want to find out the, either, Shared, Virtual, or Dedicated IP Address for your webhosting. You can find this out by asking your provider, reading the email they sent you when you made the hosting, or do it yourself by going into your cPanel > look for this:



    Click "Server Information" > and look for something like this (this is mine for example : )




    After you find your IP address, replace the following coding:

    Code:
    define("MYSQL_HOST", "localhost");
    with
    Code:
    (Using mine as an example)
    
    define("MYSQL_HOST", "127.0.0.1");
    With the vote URL, I have no idea with. I presume you setup something on motivote which gives you a URL for them to link to. You just replace the google URL with whatever URL you have for voting.

    Hope I helped!
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Apr 2016
    Posts
    194
    Thanks given
    25
    Thanks received
    3
    Rep Power
    63
    Quote Originally Posted by Jayson View Post
    Hello, Raiga. I'd be happy to assist you with this.

    So what you'll want to start with is by logging into your webhost > Going to cPanel (or wherever you can make a MySQL database, not sure what webhosting you're using,) > Look for something like this

    Click "MySQL Database Wizard" > Create a Database > You will, then, insert that database name into the coding by replacing:

    Code:
    define("MYSQL_DATABASE", "sqldatabase");
    with
    Code:
    define("MYSQL_DATABASE", "your_database_name");
    After you create the database you will be prompted to create a Database Username and Password > You will enter THAT username and password into the following coding (so replace : )


    Code:
    define("MYSQL_USERNAME", "sqlusername");
    
    
    
    define("MYSQL_PASSWORD", "sqlpass");
    with
    Code:
    define("MYSQL_USERNAME", "your_username");
    
    
    
    define("MYSQL_PASSWORD", "your_password");
    With your hosting, you're going to want to find out the, either, Shared, Virtual, or Dedicated IP Address for your webhosting. You can find this out by asking your provider, reading the email they sent you when you made the hosting, or do it yourself by going into your cPanel > look for this:



    Click "Server Information" > and look for something like this (this is mine for example : )




    After you find your IP address, replace the following coding:

    Code:
    define("MYSQL_HOST", "localhost");
    with
    Code:
    (Using mine as an example)
    
    define("MYSQL_HOST", "127.0.0.1");
    With the vote URL, I have no idea with. I presume you setup something on motivote which gives you a URL for them to link to. You just replace the google URL with whatever URL you have for voting.

    Hope I helped!
    Your response was great and I knew most of that but it was neat and organized so I respect that! Hopefully this post will benefit people new to mySQL. For the record I went with self hosted voting/donating/hiscore/heatmap alternative EveryThing RS created by Genesis.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Can I get a remote mySQL host?
    By Herewizard in forum Help
    Replies: 5
    Last Post: 04-29-2012, 12:29 AM
  2. Replies: 179
    Last Post: 04-09-2010, 07:45 AM
  3. Best MySQL free host?
    By Hexagon in forum Hosting
    Replies: 3
    Last Post: 08-01-2009, 09:32 AM
  4. Replies: 4
    Last Post: 01-02-2009, 05:31 AM
  5. Replies: 17
    Last Post: 07-05-2008, 09:49 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •