• 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

How can I stop a symfony process which is listening on http://127.0.0.1:8000

SilverStripe unable to populate multiple member Childs

Change user role if checkout custom checkbox is checked in WooCommerce

Laravel Schedule not sending email

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

how to check version of codeigniter framework?

Put content of wordpress page inside div

php retrieve specific data onclick from database in a list format

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

How Can I Do LIMIT 1, 2 In WP_Query

How to debug in WooCommerce 3+

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

Download & Save Zoom Recording in directory by PHP

How to render html from a @foreach loop in a textarea

Correctly determine if date string is a valid date in that format

About Contact Privacy policy Terms and conditions