+ Reply to Thread
Results 1 to 24 of 24

Thread: simple MYSQL connection
      
   

  1. #1
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default simple MYSQL connection

    Hello
    im trying to do a simple check up for a connection to my database through PHP script that looks like that :

    <?php mysql_connect("74.86.118.24
    ", "user", "password") or die(mysql_error()); echo "Connected to MySQL<br />"; ?>

    but it always answers :

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dannydb '@'voda23.voda23.com' (using password: YES) in /home/rgajsgjb/public_html/test.php on line 5
    Access denied for user 'dannydb '@'voda23.voda23.com' (using password: YES)

    what didnt i do good ?

    *the user that i interd is the one i created with ABVFP

    my site is www.brasilwebdesign.com (the link in the center of the page)

    thanks

  2. #2
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    Hello
    im trying to do a simple check up for a connection to my database through PHP script that looks like that :

    <?php mysql_connect("74.86.118.24
    ", "user", "password") or die(mysql_error()); echo "Connected to MySQL<br />"; ?>

    but it always answers :

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dannydb '@'voda23.voda23.com' (using password: YES) in /home/rgajsgjb/public_html/test.php on line 5
    Access denied for user 'dannydb '@'voda23.voda23.com' (using password: YES)

    what didnt i do good ?

    *the user that i interd is the one i created with ABVFP

    my site is www.brasilwebdesign.com (the link in the center of the page)

    thanks
    Hi Danny,
    I am not sure why you would want to access your database from your page. Will you be a little more specific as to what you are trying to accomplish please?
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  3. #3
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    in general
    can i access my database with a script like that at all ?

    or i can get access only from the Form way

  4. #4
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    hi
    im trying to learn how to create a MYSQL PHP site
    that i can let people post messages on the site , it will be more of a donate stuff site

    so im trying to make the first step of quyering data from the database by connectiong to mysql

  5. #5
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    in general
    can i access my database with a script like that at all ?

    or i can get access only from the Form way
    I am sure if you know how to set up scripts it may be possible but don't quote me on that.

    You can always access your phpmyadmin on cpanel and it will be safer there than to try to access your database from your website
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  6. #6
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    hi
    im trying to learn how to create a MYSQL PHP site
    that i can let people post messages on the site , it will be more of a donate stuff site

    so im trying to make the first step of quyering data from the database by connectiong to mysql

    Ok I understand. If you said you already set up a database using ABVFP then that is good enough right there. NavalDesign is the best to talk to about that.
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  7. #7
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    is there a way to contact navaldesign ?

    in general what is the password and user name i should inter ?

    *i have one that i created for the ABVFP and the regular user name for the CP

  8. #8
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    is there a way to contact navaldesign ?

    in general what is the password and user name i should inter ?

    *i have one that i created for the ABVFP and the regular user name for the CP
    Yes there is. You may go to his website at http://www.dbtechnosystems.com

    You may also get your answers right there on his site. Contact him from there
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  9. #9
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    The password and username is up to you. I couldn't answer that. When you go to cpanel and go to mysql database that part is left up to you what name you want your database to be as well as your username and password.
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  10. #10
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    10x

  11. #11
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    10x
    Is that how many times you've tried? Don't worry NavalDesign will get you in the right direction. Also check out this thread as to it may help you as well.

    http://www.vodahost.com/vodatalk/mys...ating+database
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  12. #12
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    hehehe

    10=than x=ks

    ==

    thanks

  13. #13
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    hehehe

    10=than x=ks

    ==

    thanks

    lol gotcha, you are welcome. Did that thread help you?
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  14. #14
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    no man
    its not realy the same matter...

    my thing is just to get a simple connection to the MYSQL thats it....nothing more

    but seems to be impossible yet

  15. #15
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Actually it's WO man lol but sorry if that wasn't any help to you
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  16. #16
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    :)
    sorry about that StrictlyBusiness

  17. #17
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    :)
    sorry about that StrictlyBusiness
    lol no worries Danny. I don't actually have a very femenine name lol. I am just sorry that I wasn't able to help you but I hope you hear from Naval soon or someone on the forum who knows how to assist you further.
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  18. #18
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    i went to the link of naval's site and tried to submit a support form but they want there any fields that i realy dont know where to find that information

    why they make it so dificult

  19. #19
    StrictlyBusiness's Avatar
    StrictlyBusiness is offline Second Lieutenant
    Join Date
    Nov 2007
    Location
    Oklahoma
    Posts
    133

    Default Re: simple MYSQL connection

    Quote Originally Posted by dannysheps********.com View Post
    i went to the link of naval's site and tried to submit a support form but they want there any fields that i realy dont know where to find that information

    why they make it so dificult
    Hi Danny,
    There contact form isn't difficult at all. Go to the contact link. You provide him the information that is required "You will know which one is required by the red astericks" then let him know how urgent it is in priority then "How do you want to be contacted via email, phone, etc. You heard about him from VH Forum and then enter the verification letters and numbers and that is it. You don't have to worry about the upload part unless there is something you want him to look at.
    Diane
    www.smallbizunite.net

    At first you don't succeed, pick yourself up and try again!

  20. #20
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    anyone ?

  21. #21
    memoryleak is offline Private
    Join Date
    Mar 2008
    Posts
    3

    Default Re: simple MYSQL connection

    Hey, Danny.

    Here's an example database connection
    Code:
    <?
    $path = "MYSQL SERVER PATH";
    $dbusername = "USERNAME";
    $dbpassword = "PASSWORD";
    $dbname = "DATABASE NAME";
    $conn = mysql_connect($path, $dbusername, $dbpassword);
    mysql_select_db($dbname);
    ?>
    http://WebsiteHacks.com
    Computer and website programming/design/development help.

  22. #22
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: simple MYSQL connection

    10x
    got it

  23. #23
    VFRodriguez's Avatar
    VFRodriguez is offline Staff Sergeant
    Join Date
    Dec 2007
    Posts
    45

    Default Re: simple MYSQL connection

    How do I configure PHP scripts that must be hidden from public_html? I have two domains and want to save the index.php in the public_html but other .php files in not public directories.

  24. #24
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: simple MYSQL connection

    You are not sufficiently clear.
    Once you have published the index file in your public_html, the other files are not visible any more. If, anyway, you want to publish the other files elsewhere, just create another folder and publish them there.

    If that is not what you wanted, please explain.
    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!


Thread Information

Users Browsing this Thread

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

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49