Hi again,
Unless you added a password to the `root` userid then by default there is not password on `root`.
So try this
<?php
$db_name="webappdb";
$sql_name="root";
$sql_pass="";
$server_name="localhost";
$con=mysqli_connect($server_name,$sql_name,$sql_pass,$db_name);
if(!$con){
echo"Database Connection Error...".mysqli_connect_error();
} else{
echo"<h3>Database Connection Success....</h3>"
}
?>
If this fails please paste the EXACT error message into your next post
Also REMEMBER you must run this now through your browser using `localhost/webapps/init.php`
You cannot run PHP code by doubleclicking on the `init.php` file name in windows explorer.
---------------------------------------------------------------------------------------------
(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 --
phpMyAdminGet 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-
Edited 1 time(s). Last edit at 07/01/2016 10:29AM by RiggsFolly.