Closed Thread
Results 1 to 9 of 9
Like Tree4Likes
  • 1 Post By Gouri
  • 1 Post By er.rohittank22
  • 1 Post By misson
  • 1 Post By callumacrae

Thread: Mysql connection

  1. #1
    sirdyowi71 is offline x10Hosting Member sirdyowi71 is an unknown quantity at this point
    Join Date
    Jul 2011
    Location
    Philippines
    Posts
    3

    Mysql connection

    how do i connect to my MySQL? what port should i call, what user name, what password???
    For example:
    in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: Mysql connection

    Quote Originally Posted by sirdyowi71 View Post
    how do i connect to my MySQL? what port should i call, what user name, what password???
    For example:
    in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...

    Read How to Create MySQL Database and User


    MySQL Hostname is localhost.
    Last edited by Gouri; 07-10-2011 at 04:45 AM.
    sirdyowi71 likes this.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    er.rohittank22 is offline x10Hosting Member er.rohittank22 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    4

    Re: Mysql connection

    Quote Originally Posted by sirdyowi71 View Post
    how do i connect to my MySQL? what port should i call, what user name, what password???
    For example:
    in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...
    First create database in cpanel by Mysql Database Wizard.......
    then define username password in your file eg.
    <?php define('DB_HOST', 'localhost'); define('DB_USER', 'your_db_username'); define('DB_PASSWORD', 'your_password'); define('DB_DATABASE', 'your_db'); ?>
    sirdyowi71 likes this.

  4. #4
    sirdyowi71 is offline x10Hosting Member sirdyowi71 is an unknown quantity at this point
    Join Date
    Jul 2011
    Location
    Philippines
    Posts
    3

    Re: Mysql connection

    Quote Originally Posted by Gouri View Post
    Read How to Create MySQL Database and User


    MySQL Hostname is localhost.


    how about port number for mySQL connection...???? do i need to specify??? or just plain localhost and not this one "localhost:3306" ?????

  5. #5
    SJ.Wolfe's Avatar
    SJ.Wolfe is offline x10 Elder SJ.Wolfe is an unknown quantity at this point
    Join Date
    Aug 2010
    Location
    Washington, U.S.A.
    Posts
    590

    Re: Mysql connection

    You'll just need to use localhost. You can only connect from scripts running within your hosting account, however. Remote MySQL connections are not enabled on free hosting.
    SJWolfe - Volunteer Community Customer Service Representative
    Do NOT PM me, email me, or leave me a profile comment requesting support - Create a support ticket.
    Livewire's Slave - Wielder of the Finely Dressed Pimp Slap
    Join us on IRC! irc.x10hosting.com:6667 #publicchat

  6. #6
    mgmmanny29 is offline x10Hosting Member mgmmanny29 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    1

    Re: Mysql connection

    i dont need help

  7. #7
    sirdyowi71 is offline x10Hosting Member sirdyowi71 is an unknown quantity at this point
    Join Date
    Jul 2011
    Location
    Philippines
    Posts
    3

    Re: Mysql connection

    Quote Originally Posted by SJ.Wolfe View Post
    You'll just need to use localhost. You can only connect from scripts running within your hosting account, however. Remote MySQL connections are not enabled on free hosting.
    tnx for the info..... :D

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Mysql connection

    Quote Originally Posted by mgmmanny29 View Post
    i dont need help
    Then why are you posting? Don't post if you're not going to contribute.

    For everyone else, the only documents you need are the one Gouri linked to and "MySQL Information".
    Livewire likes this.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  9. #9
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Mysql connection

    And on that note, thread locked.
    Livewire likes this.
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

Closed Thread

Similar Threads

  1. Mysql no connection
    By olirav61 in forum Free Hosting
    Replies: 3
    Last Post: 03-11-2011, 04:17 AM
  2. mysql connection
    By ambilly30 in forum Free Hosting
    Replies: 2
    Last Post: 03-03-2011, 07:53 AM
  3. MySql Connection??
    By glbl483118 in forum Free Hosting
    Replies: 1
    Last Post: 12-06-2010, 10:52 PM
  4. [c#] Connection to MySQL DB ?
    By cabzx in forum Programming Help
    Replies: 6
    Last Post: 04-25-2008, 05:16 PM
  5. Replies: 9
    Last Post: 01-10-2008, 03:16 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
x10hosting free hosting for the masses
dedicated servers