I am trying to connect database
using PHP and Apache2 server but it could not connect. I am providing my code below.
<?php
session_start();
$_SESSION['start'] = time();
$_SESSION['show_session_alert'] = 1;
$VIEW_ADMIN = 1;
$VIEW_OWNER = 2;
$con = mysql_connect("localhost", "root", "abcdefg");
mysql_select_db('easyride', $con);
$connect = mysqli_connect("localhost", "root", "abcdefg", "easyride");
?>
I am trying to connect to MySQL database but it could not connected. I am giving below the phpMyAdmin configuration file.
/etc/phpmyadmin/config-db.php:
$dbuser='phpmyadmin';
$dbpass='abcdefg';
$basepath='';
$dbname='phpmyadmin';
$dbserver='';
$dbport='';
$dbtype='mysql';
Here I am unable to connect getting the error localhost is currently unable to handle this request: HTTP ERROR 500
. I need to connect to my MySQL database.