<?php
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
define('DB_SERVER', 'server name');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'database name');
/* Attempt to connect to MySQL database */
$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if($con === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>
I have the above code which works on the server if I put the php files separately. However, I when I try to put this on a woody snippet its gives an error as below.
Don't Panic
The code snippet you are trying to save produced a fatal error on line 9:
mysqli_connect(): (28000/1045): Access denied for user 'nanosoft_Sam'@'mocha3027.mochahost.com' (using password: YES)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
I contacted hosting company and they asked me to talk to the plugin guys. Because server is working.
CAN SOMEONE PLEASE HELP ME I AM SO STUCK.
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
define('DB_SERVER', 'server name');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'database name');
/* Attempt to connect to MySQL database */
$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if($con === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>
I have the above code which works on the server if I put the php files separately. However, I when I try to put this on a woody snippet its gives an error as below.
Don't Panic
The code snippet you are trying to save produced a fatal error on line 9:
mysqli_connect(): (28000/1045): Access denied for user 'nanosoft_Sam'@'mocha3027.mochahost.com' (using password: YES)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
I contacted hosting company and they asked me to talk to the plugin guys. Because server is working.
CAN SOMEONE PLEASE HELP ME I AM SO STUCK.