I have tried all the solutions for the connection. My database users exist. When i tried connecting using the following code it get connected(by creating test.php file and calling it):
<?php
$servername = "localhost";
$username = "acknoxmv_acn";
$password = "mysecrete";
// Create connection
$conn = new mysqli($servername, $username, $password,'acknoxmv_acn');
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
but on trying same username and password with laravel .env file it gives error. I have tried all the solutions previosly available on internet.
.env file snap is as below
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:AYMzhMirrHPY3gkKv5Z6JqnSJAscsSxFp6+nW4mPyqI=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=acknoxmv_acn
DB_USERNAME=acknoxmv_acn
DB_PASSWORD=mysecrete
My code is working well in my pc i.e. using xampp. Now i am trying to test it on bigrock cloud server. My database name and user name is same.
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Xsf1R8
via IFTTT
Aucun commentaire:
Enregistrer un commentaire