Internal server error on phpmyadmin to online website
Good day, as the pictures show, my website has the following error after an upload I did to have some changes:
500 Internal Server Error
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (1045)
any help would be appreciated. I am guessing it has something to do with the database not connecting to the website.
I was just given this to try to work out and the db config file is:
<?php
class config_db {
public function init() {
$db = new PDO('mysql:host=localhost;dbname=mywhitecard;charset=utf8', 'root', '');
date_default_timezone_set('Hongkong');
return $db;
}
}
?>
I have access to the database but where do I know the actual username and password needed? I tried to enable each one but I get the exact same 500 Internal Server Error
enter image description here
UPDATE:I really dont know why access is denied where clearly it is granted here in the user accounts.
UPDATE 2: I tried to create a new database where I imported the current one and a new user with a name and password, I still get the same 500 internal server error just with the new user getting the access denied.
php mysql phpmyadmin filezilla
|
show 1 more comment
Good day, as the pictures show, my website has the following error after an upload I did to have some changes:
500 Internal Server Error
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (1045)
any help would be appreciated. I am guessing it has something to do with the database not connecting to the website.
I was just given this to try to work out and the db config file is:
<?php
class config_db {
public function init() {
$db = new PDO('mysql:host=localhost;dbname=mywhitecard;charset=utf8', 'root', '');
date_default_timezone_set('Hongkong');
return $db;
}
}
?>
I have access to the database but where do I know the actual username and password needed? I tried to enable each one but I get the exact same 500 Internal Server Error
enter image description here
UPDATE:I really dont know why access is denied where clearly it is granted here in the user accounts.
UPDATE 2: I tried to create a new database where I imported the current one and a new user with a name and password, I still get the same 500 internal server error just with the new user getting the access denied.
php mysql phpmyadmin filezilla
1
Well, errorAccess denied for user
says it all.where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials
– Justinas
Nov 13 '18 at 9:14
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
1
You need to use the correct username and password to access that database. Usingroot
user to populate website contents is Highly Discouraged
– Martin
Nov 13 '18 at 9:56
|
show 1 more comment
Good day, as the pictures show, my website has the following error after an upload I did to have some changes:
500 Internal Server Error
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (1045)
any help would be appreciated. I am guessing it has something to do with the database not connecting to the website.
I was just given this to try to work out and the db config file is:
<?php
class config_db {
public function init() {
$db = new PDO('mysql:host=localhost;dbname=mywhitecard;charset=utf8', 'root', '');
date_default_timezone_set('Hongkong');
return $db;
}
}
?>
I have access to the database but where do I know the actual username and password needed? I tried to enable each one but I get the exact same 500 Internal Server Error
enter image description here
UPDATE:I really dont know why access is denied where clearly it is granted here in the user accounts.
UPDATE 2: I tried to create a new database where I imported the current one and a new user with a name and password, I still get the same 500 internal server error just with the new user getting the access denied.
php mysql phpmyadmin filezilla
Good day, as the pictures show, my website has the following error after an upload I did to have some changes:
500 Internal Server Error
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (1045)
any help would be appreciated. I am guessing it has something to do with the database not connecting to the website.
I was just given this to try to work out and the db config file is:
<?php
class config_db {
public function init() {
$db = new PDO('mysql:host=localhost;dbname=mywhitecard;charset=utf8', 'root', '');
date_default_timezone_set('Hongkong');
return $db;
}
}
?>
I have access to the database but where do I know the actual username and password needed? I tried to enable each one but I get the exact same 500 Internal Server Error
enter image description here
UPDATE:I really dont know why access is denied where clearly it is granted here in the user accounts.
UPDATE 2: I tried to create a new database where I imported the current one and a new user with a name and password, I still get the same 500 internal server error just with the new user getting the access denied.
php mysql phpmyadmin filezilla
php mysql phpmyadmin filezilla
edited Nov 21 '18 at 7:43
Hadrian Clayton
asked Nov 13 '18 at 9:10
Hadrian ClaytonHadrian Clayton
968
968
1
Well, errorAccess denied for user
says it all.where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials
– Justinas
Nov 13 '18 at 9:14
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
1
You need to use the correct username and password to access that database. Usingroot
user to populate website contents is Highly Discouraged
– Martin
Nov 13 '18 at 9:56
|
show 1 more comment
1
Well, errorAccess denied for user
says it all.where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials
– Justinas
Nov 13 '18 at 9:14
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
1
You need to use the correct username and password to access that database. Usingroot
user to populate website contents is Highly Discouraged
– Martin
Nov 13 '18 at 9:56
1
1
Well, error
Access denied for user
says it all. where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials– Justinas
Nov 13 '18 at 9:14
Well, error
Access denied for user
says it all. where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials– Justinas
Nov 13 '18 at 9:14
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
1
1
You need to use the correct username and password to access that database. Using
root
user to populate website contents is Highly Discouraged– Martin
Nov 13 '18 at 9:56
You need to use the correct username and password to access that database. Using
root
user to populate website contents is Highly Discouraged– Martin
Nov 13 '18 at 9:56
|
show 1 more comment
2 Answers
2
active
oldest
votes
Create a new database. Create a new user. Copy db 'mywhitecard' into new database. Now in the configuration php file use:
$db = new PDO('mysql:host=localhost;dbname='newdb';charset=utf8', 'newuser', 'newpass');
All the best!!!
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
add a comment |
Try setting a username and password for the database. There are several different types of security (typically default) permissions that you may be running into that will disable the login without password.
I ran into a similar issue a few years ago, but I haven't used php/mysql in a few years, so this may be old/ancient advice :)
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277415%2finternal-server-error-on-phpmyadmin-to-online-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Create a new database. Create a new user. Copy db 'mywhitecard' into new database. Now in the configuration php file use:
$db = new PDO('mysql:host=localhost;dbname='newdb';charset=utf8', 'newuser', 'newpass');
All the best!!!
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
add a comment |
Create a new database. Create a new user. Copy db 'mywhitecard' into new database. Now in the configuration php file use:
$db = new PDO('mysql:host=localhost;dbname='newdb';charset=utf8', 'newuser', 'newpass');
All the best!!!
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
add a comment |
Create a new database. Create a new user. Copy db 'mywhitecard' into new database. Now in the configuration php file use:
$db = new PDO('mysql:host=localhost;dbname='newdb';charset=utf8', 'newuser', 'newpass');
All the best!!!
Create a new database. Create a new user. Copy db 'mywhitecard' into new database. Now in the configuration php file use:
$db = new PDO('mysql:host=localhost;dbname='newdb';charset=utf8', 'newuser', 'newpass');
All the best!!!
answered Nov 13 '18 at 16:20
Sudipta BhattacharyyaSudipta Bhattacharyya
756
756
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
add a comment |
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
nevermind, turns out it worked specifically if i use a new username and password connected to the current database name, not a new one. thank you for the straight to the point fix.
– Hadrian Clayton
Nov 13 '18 at 17:04
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
happy to help. :)
– Sudipta Bhattacharyya
Dec 26 '18 at 18:59
add a comment |
Try setting a username and password for the database. There are several different types of security (typically default) permissions that you may be running into that will disable the login without password.
I ran into a similar issue a few years ago, but I haven't used php/mysql in a few years, so this may be old/ancient advice :)
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
add a comment |
Try setting a username and password for the database. There are several different types of security (typically default) permissions that you may be running into that will disable the login without password.
I ran into a similar issue a few years ago, but I haven't used php/mysql in a few years, so this may be old/ancient advice :)
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
add a comment |
Try setting a username and password for the database. There are several different types of security (typically default) permissions that you may be running into that will disable the login without password.
I ran into a similar issue a few years ago, but I haven't used php/mysql in a few years, so this may be old/ancient advice :)
Try setting a username and password for the database. There are several different types of security (typically default) permissions that you may be running into that will disable the login without password.
I ran into a similar issue a few years ago, but I haven't used php/mysql in a few years, so this may be old/ancient advice :)
answered Nov 13 '18 at 16:21
user3827635user3827635
1
1
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
add a comment |
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
thanks for the advice, tried setting a new username, password and database but I get the same error, just that the new user is the one that gets the access denied this time. I updated my question.
– Hadrian Clayton
Nov 13 '18 at 16:55
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277415%2finternal-server-error-on-phpmyadmin-to-online-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Well, error
Access denied for user
says it all.where do I know the actual username and password
- ask administrator or create new user if it's good solution and you can't recover credentials– Justinas
Nov 13 '18 at 9:14
im told the database is online along with the website how do I do that?, I can access an offline version with localhost and xampp
– Hadrian Clayton
Nov 13 '18 at 9:18
Try host=127.0.0.1 sometimes localhost isn't allowed by default.
– ivion
Nov 13 '18 at 9:21
updated my answer concerning database users
– Hadrian Clayton
Nov 13 '18 at 9:26
1
You need to use the correct username and password to access that database. Using
root
user to populate website contents is Highly Discouraged– Martin
Nov 13 '18 at 9:56