How do I log in to phpMyAdmin?
When logging in to phpmyadmin
, ask for a username and password. Where to get it from? I'm a newbie, please explain in more detail.
3 answers
Username: root
Password: root
Or:
Login: mysql
Password: mysql
Well, or sometimes even so
Username: root
Password is empty
In general, phpMyAdmin asks for access to your database.
Accordingly, the username and password must be specified for the created DATABASE user.
Or the standard ones that I specified above.
If it issues an error
2002 Cannot log in to the MySQL server
Edit the file phpmyadmin/config.inc.php, replacing this line:
$cfg['Servers'][$i]['host'] = 'localhost';
On this one:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Full listing
<?php
$cfg['blowfish_secret'] = 'ba17c1ec07d65003'; // use here a value of your choice
$i=0; $i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3307'; // MySQL port
?>
You may have edited the MySQL configuration file to run on a different port. In this case, the new port must also be specified in the phpMyAdmin configuration file (see the last line from the listing above).
Except in addition, the configuration file itself config.inc.php, should be located in the root folder of phpMyAdmin.
Before starting phpMyAdmin, MySQL should already be running. Check if there is a corresponding process in the task manager.
Make sure that the user you are trying to log in as has the appropriate permissions.
If all of the above did not help, perhaps MySQL itself is crooked. Try reinstalling it.
In ubuntu, we do this:
$ cd /etc/mysql/
$ sudo vim debian.cnf
And here is the answer:
Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint //Это пользователь
password = uTjAXFyQFsySSJOZ //Это пароль
socket = /var/run/mysqld/mysqld.sock<br>
[mysql_upgrade]
host = localhost
user = debian-sys-maint //Это пользователь
password = uTjAXFyQFsySSJOZ //Это пароль
socket = /var/run/mysqld/mysqld.sock
This thing in the settings helped me: Login: root Password is empty
Thank you