phpmyadmin connection

stasx10b

New Member
Messages
1
Reaction score
0
Points
0
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
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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:

cozynew

New Member
Messages
1
Reaction score
0
Points
0
<?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());
}
?>
 
Top