PHPMyAdmin is giving me a message saying that the user (root) does not have a password.
So, how can I create one?
asked Sep 1, 2012 at 2:29
1
Open phpMyAdmin and select the SQL tab. Then type this command:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');
Also change to this line in config.inc.php
:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
To make phpMyAdmin prompts for your MySQL username and password.
answered Sep 1, 2012 at 2:40
5
To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:
- Access phpMyAdmin with root account (no password) -> User accounts.
Click on root > Edit privileges
Then click on Change password
Enter your desired password -> Go
Logout and log-in again with new password
answered Feb 7, 2017 at 14:45
SonDangSonDang
1,4581 gold badge15 silver badges21 bronze badges
3
Well, I believe that I’ve solved the password configuration ‘issue’ — WampServer 2.2 — Windows 7.
The three steps that I did:
-
In the MySQL console set a new password. To make that:
mysqladmin -u root password 'your_password'
-
In
phpMyAdmin
click in users and set the same password to the userroot
. -
Finally, set your new password in the
config.inc.php
. Don’t change anything else in this file.
This worked for me. Good luck!
Daniel
answered Sep 3, 2012 at 22:48
1
-
Go to phpmyadmin
-
Open user account section:
-
Use EDIT Privileges
-
Change password and username
-
Add privileges for database
answered Sep 8, 2017 at 4:11
On linux (debian 9) after resetting the mysql(Maria DB) root password, you just have to edit the phpmyadmin db config file located at /etc/phpmyadmin/config-db.php
gedit /etc/phpmyadmin/config-db.php (as root)
answered Jul 16, 2018 at 17:34
ramesuramesu
691 silver badge3 bronze badges
Here the simple step that you can easily set phpMyAdmin Password.
- Goto
C:xamppphpMyAdmin
and findconfig.inc.php
file - Open
config.inc.php
file in Text editor like Notepad++. - Find the line
$cfg['Servers'][$a]['auth_type'] = 'config';
inconfig.inc.php
file. - Change the word
$cfg['Servers'][$a]['auth_type'] = 'config';
to$cfg['Servers'][$a]['auth_type'] = 'cookie';
inconfig.inc.php
file and Save the changes. - Now open browser and type
localhost/phpmyadmin
. Enter username is root. password is null means empty. you don’t type anything leave blank and press GO button. - Now you can see change password link. please click that link.
- Set your phpMyAdmin password and retype again and press GO button.
Eje
3544 silver badges8 bronze badges
answered Jan 4, 2017 at 12:18
AVSAVS
711 silver badge3 bronze badges
- Go to
http://localhost/security/index.php
- Select language, it redirects to
http://localhost/security/xamppsecurity.php
- You will find an option to change the password here
answered May 19, 2014 at 9:51
rinuthomazrinuthomaz
1,3932 gold badges22 silver badges38 bronze badges
I only had to change one line of the file config.inc.php
located in C:wampappsphpmyadmin4.1.14
.
Put the right password here …
$cfg['Servers'][$i]['password'] = 'Put_Password_Here';
answered Jul 19, 2014 at 14:31
hoggarhoggar
3,6195 gold badges29 silver badges39 bronze badges
I just faced the mysql user password problem — ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO) — when I tried to do a do-release-upgrade on my operational system. So I corrected it in 2 steps.
Firstly, as I did not had access on phpmyadmin, so I followed the «Recover MySQL root password» step on the tutorial mensioned by ThoKra:
https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords
Secondly, with one of the users that I know the password, I made some password changes to the others users through phpmyadmin itself according to SonDang’s information.
answered Apr 11, 2017 at 12:18
If you tried mysqladmin -u root password 'your_password'
and MySQL says denied access
, you need to change the my.ini so that the value password
is blank. then try mysqladmin -u root password 'your_password'
again. It should change your password and open my.ini
again and change the value password
to the previous one.
answered Jul 19, 2020 at 9:16
I believe the command you are looking for is passwd
answered Sep 1, 2012 at 2:31
DoboyDoboy
10.1k11 gold badges39 silver badges48 bronze badges
PHPMyAdmin is giving me a message saying that the user (root) does not have a password.
So, how can I create one?
asked Sep 1, 2012 at 2:29
1
Open phpMyAdmin and select the SQL tab. Then type this command:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');
Also change to this line in config.inc.php
:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
To make phpMyAdmin prompts for your MySQL username and password.
answered Sep 1, 2012 at 2:40
5
To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:
- Access phpMyAdmin with root account (no password) -> User accounts.
Click on root > Edit privileges
Then click on Change password
Enter your desired password -> Go
Logout and log-in again with new password
answered Feb 7, 2017 at 14:45
SonDangSonDang
1,4581 gold badge15 silver badges21 bronze badges
3
Well, I believe that I’ve solved the password configuration ‘issue’ — WampServer 2.2 — Windows 7.
The three steps that I did:
-
In the MySQL console set a new password. To make that:
mysqladmin -u root password 'your_password'
-
In
phpMyAdmin
click in users and set the same password to the userroot
. -
Finally, set your new password in the
config.inc.php
. Don’t change anything else in this file.
This worked for me. Good luck!
Daniel
answered Sep 3, 2012 at 22:48
1
-
Go to phpmyadmin
-
Open user account section:
-
Use EDIT Privileges
-
Change password and username
-
Add privileges for database
answered Sep 8, 2017 at 4:11
On linux (debian 9) after resetting the mysql(Maria DB) root password, you just have to edit the phpmyadmin db config file located at /etc/phpmyadmin/config-db.php
gedit /etc/phpmyadmin/config-db.php (as root)
answered Jul 16, 2018 at 17:34
ramesuramesu
691 silver badge3 bronze badges
Here the simple step that you can easily set phpMyAdmin Password.
- Goto
C:xamppphpMyAdmin
and findconfig.inc.php
file - Open
config.inc.php
file in Text editor like Notepad++. - Find the line
$cfg['Servers'][$a]['auth_type'] = 'config';
inconfig.inc.php
file. - Change the word
$cfg['Servers'][$a]['auth_type'] = 'config';
to$cfg['Servers'][$a]['auth_type'] = 'cookie';
inconfig.inc.php
file and Save the changes. - Now open browser and type
localhost/phpmyadmin
. Enter username is root. password is null means empty. you don’t type anything leave blank and press GO button. - Now you can see change password link. please click that link.
- Set your phpMyAdmin password and retype again and press GO button.
Eje
3544 silver badges8 bronze badges
answered Jan 4, 2017 at 12:18
AVSAVS
711 silver badge3 bronze badges
- Go to
http://localhost/security/index.php
- Select language, it redirects to
http://localhost/security/xamppsecurity.php
- You will find an option to change the password here
answered May 19, 2014 at 9:51
rinuthomazrinuthomaz
1,3932 gold badges22 silver badges38 bronze badges
I only had to change one line of the file config.inc.php
located in C:wampappsphpmyadmin4.1.14
.
Put the right password here …
$cfg['Servers'][$i]['password'] = 'Put_Password_Here';
answered Jul 19, 2014 at 14:31
hoggarhoggar
3,6195 gold badges29 silver badges39 bronze badges
I just faced the mysql user password problem — ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO) — when I tried to do a do-release-upgrade on my operational system. So I corrected it in 2 steps.
Firstly, as I did not had access on phpmyadmin, so I followed the «Recover MySQL root password» step on the tutorial mensioned by ThoKra:
https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords
Secondly, with one of the users that I know the password, I made some password changes to the others users through phpmyadmin itself according to SonDang’s information.
answered Apr 11, 2017 at 12:18
If you tried mysqladmin -u root password 'your_password'
and MySQL says denied access
, you need to change the my.ini so that the value password
is blank. then try mysqladmin -u root password 'your_password'
again. It should change your password and open my.ini
again and change the value password
to the previous one.
answered Jul 19, 2020 at 9:16
I believe the command you are looking for is passwd
answered Sep 1, 2012 at 2:31
DoboyDoboy
10.1k11 gold badges39 silver badges48 bronze badges
Изменить или сбросить пароль от пользователя phpMyAdmin можно:
- по SSH. Этот способ подойдёт, если вы забыли пароль пользователя, под которым подключаетесь к phpMyAdmin.
- через интерфейс phpMyAdmin. Подойдёт, если вы знаете пароль и вам нужно его сменить.
В статье мы расскажем про оба способа.
Для сброса пароля по SSH вам понадобится доступ к root-пользователю MySQL. Если вы потеряли root-доступ к серверу баз данных, воспользуйтесь инструкцией.
Учётная запись, под которой вы подключаетесь к phpMyAdmin, — это обычный пользователь mySQL. Ниже мы расскажем, как сменить забытый пароль от такой учётной записи.
Как поменять пароль phpMyAdmin по SSH
-
1.
Подключитесь к серверу по SSH.
-
2.
Подключитесь к серверу баз данных командой:
Mysql -uroot -p’password’
Вместо password напишите пароль от root-пользователя MySQL.
-
3.
Узнайте версию MySQL при помощи команды:
-
4.
Используйте одну из команд в зависимости от версии MySQL:
5.7.6 и выше:
ALTER USER 'username' IDENTIFIED BY 'password';
5.7.5 и ниже:
SET PASSWORD FOR 'username'@'localhost' = PASSWORD('password');
Вместо username введите имя пользователя, вместо password введите ваш новый пароль.
-
5.
Перезагрузите таблицы привилегий командой:
Готово, вы сменили пароль от пользователя phpMyAdmin.
Как поменять пароль в phpMyAdmin
При помощи приложения можно поменять пароль как от учётной записи, под которой вы авторизованы, так и для других учётных записей MySQL.
-
1.
Войдите в веб-интерфейс.
-
2.
Нажмите Учетные записи пользователей:
-
3.
Напротив нужного имени нажмите Редактировать привилегии:
-
4.
Вверху страницы нажмите Изменить пароль:
-
5.
Введите пароль и подтвердите его, затем нажмите Вперёд:
Готово, пароль от учётной записи изменён.
Стандартные доступы phpMyAdmin
На облачных серверах REG.RU с шаблонами LEMP и LAMP phpMyAdmin устанавливается автоматически. При подключении к такому серверу по SSH вы увидите приветственное окно с доступами:
phpMyAdmin default password
PHPMyAdmin is giving me a message saying that the user (root) does not have a password.
So, how can I create one?
asked Sep 1, 2012 at 2:29
1
Open phpMyAdmin and select the SQL tab. Then type this command:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');
Also change to this line in config.inc.php
:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
To make phpMyAdmin prompts for your MySQL username and password.
answered Sep 1, 2012 at 2:40
5
To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:
- Access phpMyAdmin with root account (no password) -> User accounts.
Click on root > Edit privileges
Then click on Change password
Enter your desired password -> Go
Logout and log-in again with new password
answered Feb 7, 2017 at 14:45
SonDangSonDang
1,4581 gold badge15 silver badges21 bronze badges
3
Well, I believe that I’ve solved the password configuration ‘issue’ — WampServer 2.2 — Windows 7.
The three steps that I did:
-
In the MySQL console set a new password. To make that:
mysqladmin -u root password 'your_password'
-
In
phpMyAdmin
click in users and set the same password to the userroot
. -
Finally, set your new password in the
config.inc.php
. Don’t change anything else in this file.
This worked for me. Good luck!
Daniel
answered Sep 3, 2012 at 22:48
1
-
Go to phpmyadmin
-
Open user account section:
-
Use EDIT Privileges
-
Change password and username
-
Add privileges for database
answered Sep 8, 2017 at 4:11
On linux (debian 9) after resetting the mysql(Maria DB) root password, you just have to edit the phpmyadmin db config file located at /etc/phpmyadmin/config-db.php
gedit /etc/phpmyadmin/config-db.php (as root)
answered Jul 16, 2018 at 17:34
ramesuramesu
691 silver badge3 bronze badges
Here the simple step that you can easily set phpMyAdmin Password.
- Goto
C:xamppphpMyAdmin
and findconfig.inc.php
file - Open
config.inc.php
file in Text editor like Notepad++. - Find the line
$cfg['Servers'][$a]['auth_type'] = 'config';
inconfig.inc.php
file. - Change the word
$cfg['Servers'][$a]['auth_type'] = 'config';
to$cfg['Servers'][$a]['auth_type'] = 'cookie';
inconfig.inc.php
file and Save the changes. - Now open browser and type
localhost/phpmyadmin
. Enter username is root. password is null means empty. you don’t type anything leave blank and press GO button. - Now you can see change password link. please click that link.
- Set your phpMyAdmin password and retype again and press GO button.
Eje
3544 silver badges8 bronze badges
answered Jan 4, 2017 at 12:18
AVSAVS
711 silver badge3 bronze badges
- Go to
http://localhost/security/index.php
- Select language, it redirects to
http://localhost/security/xamppsecurity.php
- You will find an option to change the password here
answered May 19, 2014 at 9:51
rinuthomazrinuthomaz
1,3932 gold badges22 silver badges38 bronze badges
I only had to change one line of the file config.inc.php
located in C:wampappsphpmyadmin4.1.14
.
Put the right password here …
$cfg['Servers'][$i]['password'] = 'Put_Password_Here';
answered Jul 19, 2014 at 14:31
hoggarhoggar
3,6195 gold badges29 silver badges39 bronze badges
I just faced the mysql user password problem — ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO) — when I tried to do a do-release-upgrade on my operational system. So I corrected it in 2 steps.
Firstly, as I did not had access on phpmyadmin, so I followed the «Recover MySQL root password» step on the tutorial mensioned by ThoKra:
https://www.howtoforge.com/setting-changing-resetting-mysql-root-passwords
Secondly, with one of the users that I know the password, I made some password changes to the others users through phpmyadmin itself according to SonDang’s information.
answered Apr 11, 2017 at 12:18
If you tried mysqladmin -u root password 'your_password'
and MySQL says denied access
, you need to change the my.ini so that the value password
is blank. then try mysqladmin -u root password 'your_password'
again. It should change your password and open my.ini
again and change the value password
to the previous one.
answered Jul 19, 2020 at 9:16
I believe the command you are looking for is passwd
answered Sep 1, 2012 at 2:31
DoboyDoboy
10.1k11 gold badges39 silver badges48 bronze badges
I’ve set up mysql and phpmyadmin and chose not to set a password when installing hoping that once set up i could login with root and no password but i get the following error from phpmyadmin:
Login without a password is forbidden by configuration (see AllowNoPassword)
I have previously moved the phpmyadmin folder to /var/www/
I have tried changing the following line
$cfg['Servers'][$i]['AllowNoPassword'] = false;
to
$cfg['Servers'][$i]['AllowNoPassword'] = true;
but still had no success, so i am wondering is there a way i can change the root passwords for both so i can access phpmyadmin and create databases.
Rinzwind
288k39 gold badges561 silver badges701 bronze badges
asked Apr 4, 2012 at 5:15
1
You can change the mysql root password by logging in to the database directly (mysql -h your_host -u root
) then run
SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');
phpmyadmin should use that password so not quite sure what you mean by «for both».
Make sure to set the new password into phpmyadmin’s config.inc.php
too, at line
$cfg['Servers'][$i]['password'] = 'yourpassword';
Otherwise, phpmyadmin may not work, echoing
Access denied for user 'user'@'localhost' (using password: YES)
answered Apr 4, 2012 at 6:00
geermc4geermc4
1,4931 gold badge13 silver badges20 bronze badges
4
It depends on your configuration.
Follow the instruction below to reconfigure phpmyadmin, and reset MySQL password.
- Ctrl + Alt + T to launch terminal
sudo dpkg-reconfigure phpmyadmin
- Connection method for MySQL database for phpmyadmin: unix socket
- Name of the database’s administrative user:
root
- Password of the database’s administrative user: mysqlsamplepassword
- MySQL username for phpmyadmin: root
- MySQL database name for phpmyadmin: phpmyadmin
- Web server to reconfigure automatically: apache2
- ERROR 1045
- ignore
sudo dpkg-reconfigure mysql-server-5.5
- New password for the MySQL «root» user: mysqlsamplepassword
- Repeat password for the MySQL «root» user: mysqlsamplepassword
-
After all this run following command on terminal to secure your mysql server.
sudo mysql_secure_installation -
Enter current password for root (enter for none): mysqlsamplepassword
- Change the root password? [Y/n] n
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y
Wish it helps!
Have a nice day!
Anwar
74.8k31 gold badges189 silver badges306 bronze badges
answered Aug 13, 2012 at 7:30
Amigo ChanAmigo Chan
6977 silver badges6 bronze badges
2
I recently came across this very same issue Ubuntu 12.04. I just couldn’t seem to login with root & no password. I set the AllowNoPassword setting to TRUE in the config. Later I found out that I was editing the wrong config.inc.php file to add the AllowNoPassword setting.
Edit:
/etc/phpmyadmin/config.inc.php
Not:
/usr/share/phpmyadmin/config.inc.php
I believe the first is the debian local config file, which will override the usr version.
answered May 31, 2012 at 1:20
jjwdesignjjwdesign
3101 silver badge12 bronze badges
1