• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

phpmysqlmysqli


PHP Snippet 1:

<?php
$mysqli = new mysqli("localhost","my_user","my_password","my_db");

// Check connection
if ($mysqli -> connect_errno) {
  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  exit();
}
?>

Related Snippets

PHP: set a (deep) array key from an array [closed]

Make certain characters of a word from string bold

Lexik JWT authentication problem "Invalid credentials"

Assets not referencing to public folder (Laravel)

Get orders by date and status woocommerce

Insert And Retrieve Data in MySQL with $.post Noob Question

args[max_input] woocommerce if statement confused

Autoloading classes in PHPUnit using Composer and autoload.php

Custom API and cunsuming in php?

SQLSTATE[HY000]: General error: 1 table posts has no column named *

CSS file not imported in laravel blade view

How do I call a php file with axios?

how to fix Service provider class not found when using repository?

Make survey at laravel 5.4 and MySQL

Handling expired token in Laravel

About Contact Privacy policy Terms and conditions