Unable to connect to Database
Posted by: terrym (---.bb.sky.com)
Date: September 19, 2014 12:15PM

I have just upgraded to Wampserver 2.5 to help remove the PHP error about mysql_connect being deprecated. But using a very simple script to test the mysqli connect, I keep on getting this error message....

Warning: mysqli::mysqli(): (HY000/1049): Base 'db534830912' inconnue in C:\wamp\www\testcon.php on line 8

And this is the PHP code...

<?php
// Connect
$db_name = 'db534830912';
$db_host = 'localhost';
$db_user = 'dbo534830912';
$db_pass = 'Tarb2010';

$mysqli = new mysqli($db_host, $db_user, $db_pass, $db_name);

?>

Having never seen this type of error message before, I'm not sure if it is PHP or MySQL. I have tried various "online" solutions in an attempt to connect to my Database, but none of them work. All I get are different error messages, but no connection.

So it would be really great if someone can help me to sort out this problem, or even point me to a decent tutorial about using the mysqli extension.

Thanks
Terry

Options: ReplyQuote
Re: Unable to connect to Database
Posted by: Otomatic (Moderator)
Date: September 19, 2014 02:53PM

Hi,

The database 'db534830912' does not exists.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Unable to connect to Database
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 20, 2014 07:13AM

If you had a database called 'db534830912' in your old version of WAMPServer it will not now be there in your new version of WAMPServer unless you backed it up and can now restore it to the new version.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.