Looks like I am doing something wrong here:
mysql -u root -p
Enter password: (my_mysql_passwd)
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql>
mysql> USE MYDB;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SHOW TABLES;
.... shows all tables in MYDB
So in php I assume
$dbuser='root';
$dbpass='my_mysql_passwd';
$dbname='MYDB';
$link = mysqli_connect('localhost',"$dbuser","$dbpass","$dbname") or die("Some error occurred during conne
ction to the $dbname database " . mysqli_error($link));
produces nothing
same for
$link = mysqli_connect("localhost","$dbuser","$dbpass","$dbname");
if (mysqli_connect_errno($link))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
Any idea what is wrong ?
mysql -u root -p
Enter password: (my_mysql_passwd)
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql>
mysql> USE MYDB;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SHOW TABLES;
.... shows all tables in MYDB
So in php I assume
$dbuser='root';
$dbpass='my_mysql_passwd';
$dbname='MYDB';
$link = mysqli_connect('localhost',"$dbuser","$dbpass","$dbname") or die("Some error occurred during conne
ction to the $dbname database " . mysqli_error($link));
produces nothing
same for
$link = mysqli_connect("localhost","$dbuser","$dbpass","$dbname");
if (mysqli_connect_errno($link))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
Any idea what is wrong ?