Home >Database >phpMyAdmin >How to solve the problem that phpMyAdmin cannot log in in Linux

How to solve the problem that phpMyAdmin cannot log in in Linux

angryTom
angryTomOriginal
2019-11-23 16:03:153643browse

The following column phpmyadmin tutorial will introduce to you the solution to the problem that phpMyAdmin cannot log in in Linux. I hope it will be helpful to friends in need!

How to solve the problem that phpMyAdmin cannot log in in Linux

##How to solve the problem that phpMyAdmin cannot log in in linux

Problem description

First, I logged in on phpmyadmin, but it showed that I could not log in. Because mysql was reinstalled, I tried the previous password and found that I could log in. According to the Internet, it is usually the first time. When logging in, the user name is root and the password is blank. Then I log in directly on the web page and find that I still cannot log in.

How to solve the problem that phpMyAdmin cannot log in in Linux

Solution

Then I tried to log in in the Linux terminal and found many methods on the Internet.

Tip here, it is best not to change it directly in the file, which may cause the entire program to directly crash. However, when you forget your password, you can check the password in config.default.php.

The following is the situation where you cannot log in on the shell

How to solve the problem that phpMyAdmin cannot log in in Linux

No more nonsense, here are the solution steps

Stop mysql service

service mysql stop

How to solve the problem that phpMyAdmin cannot log in in Linux

Set database permissions so that everyone can log in, that is, skip verification (if you are interested, you can take a look at the skip -grant command, I also know a little bit about it)

mysqld –skip-grant-tables

After the command is executed, we are equivalent to logging in without verification. Then we can set up verification and add users.

mysqld –skip-grant-tables –user=root(root为你想设置的用户名,–别错了)

Then open a remote link, and the current terminal does not need to be closed. At this time, we can log in directly without a password.

mysql -u root -p

After logging in, we can use the mysql command to set the username and password we want.

How to solve the problem that phpMyAdmin cannot log in in Linux

That’s it, the problem is solved.

Recommended tutorial:

PHPMyAdmin Getting Started Tutorial

The above is the detailed content of How to solve the problem that phpMyAdmin cannot log in in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn