Php my admin root password

Create a root password for PHPMyAdmin

PHPMyAdmin is giving me a message saying that the user (root) does not have a password. So, how can I create one?

root user for mysql? or server root? phpmyadmin wouldnt need server root. why would it? you need to look into mysql user account and set that to phpmyadmin

12 Answers 12

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.

@malintha you don’t need to store your password in that config file. If some one can read your config.inc.php file, then they can use it easily..

This is correct. More simply to access PhpMyAdmin with MySQL server’s root password, as stated in this reply, modify $cfg[‘Servers’][$i][‘auth_type’] to = ‘cookie and $cfg[‘Servers’][$i][‘password’] = »; , this will accept the MySQL’ root password

quotes are required, took the liberty to fix it. If you think if wrong please correct them and Ill glad to put the correction in comment. Sorry and thanks for your answer, very helpful

To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:

enter image description here

Click on root > Edit privileges

enter image description here

Then click on Change password

enter image description here

Enter your desired password -> Go

Logout and log-in again with new password

Not sure why everyone else is making it more complicated. This works perfectly, is simple and answers the OP’s question.

if you had your root account without a pwd then do not forget to add to your config.inc.php : $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’; or update config.inc.php cause otherwise you will get auth error on entering the admin

I get #1819 — Your password does not satisfy the current policy requirements even though I have a very strong 128 bit password with a-Z 0-9 and special chars. It also says «extremly weak»

Well, I believe that I’ve solved the password configuration ‘issue’ — WampServer 2.2 — Windows 7.

The three steps that I did:

  1. In the MySQL console set a new password. To make that: mysqladmin -u root password ‘your_password’
  2. In phpMyAdmin click in users and set the same password to the user root .
  3. Finally, set your new password in the config.inc.php . Don’t change anything else in this file.

This worked for me. Good luck!

PHPMyAdmin is telling you that your MySQL service is missing a root password. You can change it by accessing the MySQL command line interface. mysqladmin -u root password newpass

Thanks a lot! But how can I insert that command in MySQL server? I mean, I’ve installed phpMyAdmin and Workbench too. Sorry if this is too «newbie question».

Читайте также:  Css content property width

Is the MySQL server running on your local machine? If so open the terminal or on windows run cmd and type it in there. After that you might need to reconfigure the PHPMyAdmin installation.

  1. Go to phpmyadmin
  2. Open user account section: open user account section
  3. Use EDIT Privileges
  4. Change password and username change password and user name
  5. Add privileges for database

Here the simple step that you can easily set phpMyAdmin Password.

  1. Goto C:\xampp\phpMyAdmin and find config.inc.php file
  2. Open config.inc.php file in Text editor like Notepad++.
  3. Find the line $cfg[‘Servers’][$a][‘auth_type’] = ‘config’; in config.inc.php file.
  4. Change the word $cfg[‘Servers’][$a][‘auth_type’] = ‘config’; to $cfg[‘Servers’][$a][‘auth_type’] = ‘cookie’; in config.inc.php file and Save the changes.
  5. 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.
  6. Now you can see change password link. please click that link.
  7. Set your phpMyAdmin password and retype again and press GO button.

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)

  • 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

I only had to change one line of the file config.inc.php located in C:\wamp\apps\phpmyadmin4.1.14 .

Put the right password here .

$cfg['Servers'][$i]['password'] = 'Put_Password_Here'; 

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.

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.

I believe the command you are looking for is passwd

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.27.43548

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Как изменить пароль от phpMyAdmin

Изменить или сбросить пароль от пользователя phpMyAdmin можно:

  • по SSH. Этот способ подойдёт, если вы забыли пароль пользователя, под которым подключаетесь к phpMyAdmin.
  • через интерфейс phpMyAdmin. Подойдёт, если вы знаете пароль и вам нужно его сменить.

В статье мы расскажем про оба способа.

Для сброса пароля по SSH вам понадобится доступ к root-пользователю MySQL. Если вы потеряли root-доступ к серверу баз данных, воспользуйтесь инструкцией.

Читайте также:  Relative and absolute positioning html

Учётная запись, под которой вы подключаетесь к phpMyAdmin, — это обычный пользователь mySQL. Ниже мы расскажем, как сменить забытый пароль от такой учётной записи.

Как поменять пароль phpMyAdmin по SSH

ALTER USER 'username' IDENTIFIED BY 'password';
SET PASSWORD FOR 'username'@'localhost' = PASSWORD('password');

Готово, вы сменили пароль от пользователя phpMyAdmin.

Как поменять пароль в phpMyAdmin

При помощи приложения можно поменять пароль как от учётной записи, под которой вы авторизованы, так и для других учётных записей MySQL.

Перейти к списку учётных записей в phpMyAdmin

Нажмите Учетные записи пользователей:

Список учётных записей и действий в phpMyAdmin

Напротив нужного имени нажмите Редактировать привилегии:

Настройки пользователя в phpMyAdmin

Вверху страницы нажмите Изменить пароль:

Установка нового пароля для пользователя в phpMyAdmin

Введите пароль и подтвердите его, затем нажмите Вперёд:

Готово, пароль от учётной записи изменён.

Стандартные доступы phpMyAdmin

На облачных серверах REG.RU с шаблонами LEMP и LAMP phpMyAdmin устанавливается автоматически. При подключении к такому серверу по SSH вы увидите приветственное окно с доступами:

Стандартные доступы к phpMyAdmin

phpMyAdmin default password

Источник

How to Set MySQL Root Password using phpMyAdmin

Do you want to change the password for the root account of your MySQL server? Sometimes you may want to set a password for the ‘root’@’localhost’ account. In this article, I show you 3 possible ways to reset the password for your root account.

When your application is live, you have to pass both the username and password in order to access the database. For accessing phpMyAdmin on a live server, your hosting does set the credentials for you. But on the local server, you have to set credentials yourself. Though users rarely set the password on the local machine to access phpMyadmin, it’s always a good practice to do so.

That being said, let’s take a look at how to set MySQL Root password. I am going to show you 3 different ways of resetting the password.

How to Set Root Password in phpMyAdmin

phpMyAdmin is a fantastic software built for handling your MySQL databases. It just makes the developer’s life easy to manage the database, tables, table structures, queries, and so on.

Using phpMyAdmin, one can set the Root password in a few steps.

Go to the phpMyAdmin on the browser. Most probably you can access it using http://localhost/phpmyadmin .

Click on the ‘User Accounts’ from the top bar.

User Accounts

You will then see a list of user accounts. We need the last account from the list with the User name as ‘root’ and the Host name as ‘localhost’. Click on the ‘Edit privileges’ from the Action column of this row.

Edit Privileges

On the next screen, click on ‘Change password’. In the form, enter the password you want to set and click on ‘Go’.

Change Password

After these steps are done, head over to your editor and open the config.inc.php from the phpmyadmin directory. On my Windows 10 machine, I have an XAMPP server installed and config.inc.php path is D:\xampp\phpMyAdmin\config.inc.php . Adjust the path as per your installations.

Search for $cfg[‘Servers’][$i][‘auth_type’] in the file config.inc.php . This variable should have a ‘config’ value set by default. Change this value to ‘cookie’ as follows.

$cfg['Servers'][$i]['auth_type'] = 'cookie';

Run the URL http://localhost/phpmyadmin on the browser and this time you will be asked for entering username and password. Enter the username as ‘root’ and the password which you set in the above steps, it will log you inside the phpMyAdmin.

Читайте также:  Learning python by mark lutz 5 издание

Keep a note you have to use the same username and password in your database connection code for the applications.

This is the most efficient way of changing the Root password. However, there are 2 other ways to set the password for the ‘root’@’localhost’ account.

Other Ways to Set MySQL Root Password

If you want to try another way of changing a Root password, then first revert back to the changes made in the config.inc.php file.

$cfg['Servers'][$i]['auth_type'] = 'config';

Head over to phpMyAdmin, click on the ‘SQL’ from the top bar, and run the below query.

SET PASSWORD FOR root@localhost = PASSWORD('PASSWORD_HERE');

Replace the placeholder with the actual value. Set again the ‘cookie’ value for the $cfg[‘Servers’][$i][‘auth_type’] variable of your config.inc.php file and you are done.

The last option to reset the Root password is through the command line. For this, you again need to revert your changes of config.inc.php file.

If you have set the MySQL path in your environment then you can run the MySQL queries directly in the command prompt. If the path is not set, then open the terminal inside the MySQL installation directory. In my case, its path is D:\xampp\mysql\bin .

In the terminal, run the below command:

mysqladmin -u root password PASSWORD_HERE

Command Prompt

After this, set the value as ‘cookie’ for the $cfg[‘Servers’][$i][‘auth_type’] variable.

That’s it! I hope you got to know how to set MySQL Root password using phpMyAdmin and terminal. Please share your thoughts and suggestions in the comment section below.

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

Источник

Как авторизоваться в phpMyAdmin?

При входе в phpmyadmin , просить логин и пароль. Откуда его брать? Я новичок, объясните, пожалуйста по подробнее.

если ubuntu тогда по /etc/dbconfig-common есть файл phpmyadmin.conf и в нем записаны логин и пароль. При желании можно изменить их.

3 ответа 3

Логин: root
Пароль: root

Логин: mysql
Пароль: mysql

Логин: root
Пароль пустой

А вообще, phpMyAdmin спрашивает доступы к вашей базе данных.
Соответственно логин и пароль нужно указывать для созданного пользователя БД.
Или стандартные, которые я указал выше.

Если выдает ошибку

2002 Cannot log in to the MySQL server

Отредактируйте файл phpmyadmin/config.inc.php, заменив вот эту строчку:

$cfg['Servers'][$i]['host'] = 'localhost'; 

Возможно, вы отредактировали конфигурационный файл MySQL, чтобы он запускался на другом порту. В этом случае, новый порт нужно указать и в конфигурационном файле phpMyAdmin (см. последнюю строчку из листинга выше).

Кроме того, сам конфигурационный файл config.inc.php, должен лежать в корневой папке phpMyAdmin.

Перед стартом phpMyAdmin MySQL уже должен быть запущен. Проверьте, есть ли соответствующий процесс в диспетчере задач.

Проверьте, есть ли у пользователя, от имени которого вы пытаетесь авторизоваться, соответствующие права.

Если все вышеперечисленное не помогло, возможно, сам MySQL криво встал. Попробуйте его переустановить.

Источник

Оцените статью