Its been a while since i didn't use php and get error for connection to MySQL.
What I have tried: I tried username root, empty password and gives same error, but when tried ip of actual machine it gives me is not allowed to connect to this MariaDB server.
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "MyGuests";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}else echo "connection sucessfull";
Other errors: In phpmyadmin localhost when i click user accounts tab it gives me #126 - index for table '.\mysql\user.MYI' is corrupt; try to repair it.