Results 1 to 4 of 4

Thread: phpmyadmin connection

  1. #1
    stasx10b is offline x10Hosting Member
    Join Date
    Jun 2012
    Posts
    1

    Post phpmyadmin connection

    i try to connect with phpmyadmin with string given below

    mysql_connect('localhost',root','');

    so its does't connect so wht is connection string for x10hosting.com...?

    pls frnds solve me

  2. #2
    misson is offline x10 Spammer
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,573

    Re: phpmyadmin connection

    If you're trying to connect to the MySQL server on X10, there's no way you have access to the root MySQL account. Use your own database account.

    A failed connection should produce an error; what is it?

    On X10, phpMyAdmin is already installed in cPanel. If you're trying to install your own copy, you don't need to.

    If instead you're writing your own script and write "phpmyadmin" instead of "MySQL" (two entirely different things), the mysql extension is outdated and on its way to deprecation. Instead, use PDO, which has many useful improvements, such as prepared statements and support for the Traversable interface, so you can loop over results with foreach.
    Last edited by misson; 06-27-2012 at 01:10 PM.
    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 Jon Skeet's and Eric Raymond'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.

  3. #3
    cozynew is offline x10Hosting Member
    Join Date
    Jun 2012
    Posts
    1

    Talking Re: phpmyadmin connection

    <?php


    $host = "yourhost";
    $user = "your_user";
    $password = "your_user";
    $db_name = "db_name";


    //Array to store validation errors
    $errmsg_arr = array();

    //Validation error flag
    $errflag = false;


    $connect = mysql_connect($host,$user,$password);


    if (!$connect){
    die('could not connect:'.mysql_error());
    }
    $db_selected=mysql_select_db($db_name);
    if(!$db_selected){
    die('cant use '.$dbhost.':'.mysql_error());
    }
    ?>

  4. #4
    misson is offline x10 Spammer
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,573

    Re: phpmyadmin connection

    Code without context isn't very helpful. Code using outdated (the mysql extension) and poor practices (or die, outputting errors to non-admin users instead of logging them) is worse than unhelpful.
    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 Jon Skeet's and Eric Raymond'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.

Similar Threads

  1. Replies: 1
    Last Post: 11-14-2010, 10:17 PM
  2. Replies: 3
    Last Post: 07-02-2010, 12:58 AM
  3. Replies: 0
    Last Post: 06-25-2010, 11:02 AM
  4. PHPMyAdmin
    By foodie2010 in forum Feedback and Suggestions
    Replies: 2
    Last Post: 04-08-2010, 08:39 PM
  5. Replies: 9
    Last Post: 01-10-2008, 03:16 AM

Tags for this Thread

Posting Permissions

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