Skip to main content
added 50 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374

It's either a spelling error or the PHP code and PHPMyAdmin are connecting to different databases. It

  • a spelling error. Simply check the names again.
  • or the PHP code and PHPMyAdmin are connecting to different databases

The latter could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PHP, using either PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed PHPMyAdmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

It's either a spelling error or the PHP code and PHPMyAdmin are connecting to different databases. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PHP, using either PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed PHPMyAdmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

It's either

  • a spelling error. Simply check the names again.
  • or the PHP code and PHPMyAdmin are connecting to different databases

The latter could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PHP, using either PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed PHPMyAdmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

added 12 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374

It's either a spelling error or the PHP code and phpmyadminPHPMyAdmin are simply using different database credentialsconnecting to different databases. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PHP, using either PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed phpmyadminPHPMyAdmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

It's either a spelling error or PHP code and phpmyadmin are simply using different database credentials. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed phpmyadmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

It's either a spelling error or the PHP code and PHPMyAdmin are connecting to different databases. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PHP, using either PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed PHPMyAdmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

added 22 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374

YourIt's either a spelling error or PHP code and your phpmyadmin are simply using connecting to different database serversdifferent database credentials. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed phpmyadmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

Your code and your phpmyadmin are simply connecting to different database servers. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed phpmyadmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

It's either a spelling error or PHP code and phpmyadmin are simply using different database credentials. It could happen, for example, if you have multiple database servers on your PC installed.

To get a proof, run the following query in phpmyadmin:

show databases;

And then run the same query in PDO:

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

$pdo = new PDO("mysql:host=$host", $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$databases = $pdo->query('show databases')->fetchAll(PDO::FETCH_COLUMN);
var_dump($databases);

or mysqli

$host = 'your db host';
$user = 'your db username';
$pass = 'your db password';

mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = mysqli_connect($host, $user, $pass);
$databases = $mysqli->query('show databases')->fetch_all();
var_dump($databases);

and compare the output. It will show you that either there is a spelling error or indeed phpmyadmin and PHP are connected to different database servers.

Then you can check the configuration file in PHPmyAdmin to make sure it connects to the proper server

added 59 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374
Loading
added 320 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374
Loading
added 583 characters in body
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374
Loading
Source Link
Your Common Sense
  • 158k
  • 42
  • 227
  • 374
Loading