“Cannot log in to the MySQL server” without code using phpMyAdmin on CentOS7
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm setting up a new CentOS 7 server with Apache, MySQL and phpMyAdmin.
The installation of MySQL and phpMyAdmin worked as expected.
For the installations, I used the following guides by Digital Ocean:
MySQL installation guide
phpMyAdmin installation guide
Loging into MySQL on the server works as expected.
However, when I try to log into phpMyAdmin, I only get the "cannot log in to the MySQL server" error, but without a code.
This is a fresh installation of everything, so I am unsure what is causing this problem, since I followed all guides to a t.
php mysql phpmyadmin centos centos7
|
show 1 more comment
I'm setting up a new CentOS 7 server with Apache, MySQL and phpMyAdmin.
The installation of MySQL and phpMyAdmin worked as expected.
For the installations, I used the following guides by Digital Ocean:
MySQL installation guide
phpMyAdmin installation guide
Loging into MySQL on the server works as expected.
However, when I try to log into phpMyAdmin, I only get the "cannot log in to the MySQL server" error, but without a code.
This is a fresh installation of everything, so I am unsure what is causing this problem, since I followed all guides to a t.
php mysql phpmyadmin centos centos7
When you run this in terminal it should ask password.mysqladmin -u root -p versionis this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page
– Mohammad C
Nov 16 '18 at 14:10
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of/etc/httpd/conf.d/phpMyAdmin.confthen open original and comment out theRequireAnysection and changeDeny from AlltoAllow from Allthen try again.
– Mohammad C
Nov 19 '18 at 12:03
Also don't forget to restart after make them changes.sudo systemctl restart httpd.service
– Mohammad C
Nov 19 '18 at 12:23
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51
|
show 1 more comment
I'm setting up a new CentOS 7 server with Apache, MySQL and phpMyAdmin.
The installation of MySQL and phpMyAdmin worked as expected.
For the installations, I used the following guides by Digital Ocean:
MySQL installation guide
phpMyAdmin installation guide
Loging into MySQL on the server works as expected.
However, when I try to log into phpMyAdmin, I only get the "cannot log in to the MySQL server" error, but without a code.
This is a fresh installation of everything, so I am unsure what is causing this problem, since I followed all guides to a t.
php mysql phpmyadmin centos centos7
I'm setting up a new CentOS 7 server with Apache, MySQL and phpMyAdmin.
The installation of MySQL and phpMyAdmin worked as expected.
For the installations, I used the following guides by Digital Ocean:
MySQL installation guide
phpMyAdmin installation guide
Loging into MySQL on the server works as expected.
However, when I try to log into phpMyAdmin, I only get the "cannot log in to the MySQL server" error, but without a code.
This is a fresh installation of everything, so I am unsure what is causing this problem, since I followed all guides to a t.
php mysql phpmyadmin centos centos7
php mysql phpmyadmin centos centos7
asked Nov 16 '18 at 13:55
Niels KersicNiels Kersic
106
106
When you run this in terminal it should ask password.mysqladmin -u root -p versionis this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page
– Mohammad C
Nov 16 '18 at 14:10
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of/etc/httpd/conf.d/phpMyAdmin.confthen open original and comment out theRequireAnysection and changeDeny from AlltoAllow from Allthen try again.
– Mohammad C
Nov 19 '18 at 12:03
Also don't forget to restart after make them changes.sudo systemctl restart httpd.service
– Mohammad C
Nov 19 '18 at 12:23
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51
|
show 1 more comment
When you run this in terminal it should ask password.mysqladmin -u root -p versionis this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page
– Mohammad C
Nov 16 '18 at 14:10
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of/etc/httpd/conf.d/phpMyAdmin.confthen open original and comment out theRequireAnysection and changeDeny from AlltoAllow from Allthen try again.
– Mohammad C
Nov 19 '18 at 12:03
Also don't forget to restart after make them changes.sudo systemctl restart httpd.service
– Mohammad C
Nov 19 '18 at 12:23
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51
When you run this in terminal it should ask password.
mysqladmin -u root -p version is this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page– Mohammad C
Nov 16 '18 at 14:10
When you run this in terminal it should ask password.
mysqladmin -u root -p version is this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page– Mohammad C
Nov 16 '18 at 14:10
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of
/etc/httpd/conf.d/phpMyAdmin.conf then open original and comment out the RequireAny section and change Deny from All to Allow from All then try again.– Mohammad C
Nov 19 '18 at 12:03
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of
/etc/httpd/conf.d/phpMyAdmin.conf then open original and comment out the RequireAny section and change Deny from All to Allow from All then try again.– Mohammad C
Nov 19 '18 at 12:03
Also don't forget to restart after make them changes.
sudo systemctl restart httpd.service– Mohammad C
Nov 19 '18 at 12:23
Also don't forget to restart after make them changes.
sudo systemctl restart httpd.service– Mohammad C
Nov 19 '18 at 12:23
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51
|
show 1 more comment
1 Answer
1
active
oldest
votes
Thanks to user xdk over on the DigitalOcean community forums.
They said the following:
Assuming MySQL 8.
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Reason:
Some applications are having trouble withcaching _sha2 _password method.
Above sets the credentials to use the native one.
Executing this did the trick.
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%2f53339254%2fcannot-log-in-to-the-mysql-server-without-code-using-phpmyadmin-on-centos7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks to user xdk over on the DigitalOcean community forums.
They said the following:
Assuming MySQL 8.
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Reason:
Some applications are having trouble withcaching _sha2 _password method.
Above sets the credentials to use the native one.
Executing this did the trick.
add a comment |
Thanks to user xdk over on the DigitalOcean community forums.
They said the following:
Assuming MySQL 8.
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Reason:
Some applications are having trouble withcaching _sha2 _password method.
Above sets the credentials to use the native one.
Executing this did the trick.
add a comment |
Thanks to user xdk over on the DigitalOcean community forums.
They said the following:
Assuming MySQL 8.
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Reason:
Some applications are having trouble withcaching _sha2 _password method.
Above sets the credentials to use the native one.
Executing this did the trick.
Thanks to user xdk over on the DigitalOcean community forums.
They said the following:
Assuming MySQL 8.
ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Reason:
Some applications are having trouble withcaching _sha2 _password method.
Above sets the credentials to use the native one.
Executing this did the trick.
answered Dec 10 '18 at 10:59
Niels KersicNiels Kersic
106
106
add a comment |
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%2f53339254%2fcannot-log-in-to-the-mysql-server-without-code-using-phpmyadmin-on-centos7%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
When you run this in terminal it should ask password.
mysqladmin -u root -p versionis this working? If you get the password correct it should return the mysql version. You need to use the username root and that password you entered in the phpmyadmin login page– Mohammad C
Nov 16 '18 at 14:10
Doing this works as expected and returns version 8.0.13. However, it only works when using the root account. I don't know if that is the expected behavior.
– Niels Kersic
Nov 19 '18 at 8:39
If you have other users i think it should work. Anyways this confirms you know the root password and mysql server is working. Now we need to check that your ip address match the one to put while following the guide. It could be that you typed the wrong ip or your ip has changed. Open /etc/httpd/conf.d/phpMyAdmin.conf and check if you ip addresses match if not. Make a copy of
/etc/httpd/conf.d/phpMyAdmin.confthen open original and comment out theRequireAnysection and changeDeny from AlltoAllow from Allthen try again.– Mohammad C
Nov 19 '18 at 12:03
Also don't forget to restart after make them changes.
sudo systemctl restart httpd.service– Mohammad C
Nov 19 '18 at 12:23
I've already set the phpMyAdmin.conf to Allow from All, without effect. I read somewhere else Require all granted would also work, but still no luck. I restarted after every change.
– Niels Kersic
Nov 20 '18 at 8:51