How to change root password for mysql and phpmyadmin
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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.
password mysql phpmyadmin
add a comment |
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.
password mysql phpmyadmin
add a comment |
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.
password mysql phpmyadmin
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.
password mysql phpmyadmin
password mysql phpmyadmin
edited Apr 4 '12 at 6:02
Rinzwind
210k28404538
210k28404538
asked Apr 4 '12 at 5:15
JonJon
310138
310138
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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)
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
add a comment |
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_installationEnter 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!
MySQL password can be changed usingsudo mysql_secure_installation
as well.
– user2513149
Sep 9 '17 at 16:13
add a comment |
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.
add a comment |
protected by Community♦ Jan 28 '14 at 20:08
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
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)
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
add a comment |
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)
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
add a comment |
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)
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)
edited Apr 16 '15 at 17:09
Patrizio Bertoni
615
615
answered Apr 4 '12 at 6:00
geermc4geermc4
1,19811119
1,19811119
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
add a comment |
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
1
1
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Thank you, i was unsure if i had to set a password for both as i have only used WAMP in the past.
– Jon
Apr 4 '12 at 6:13
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
Where can I find config.inc.php?
– Hrvoje T
Oct 10 '16 at 9:18
2
2
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
Ok, I found it, but there is no line `$cfg['Servers'][$i]['password'] = 'yourpassword';
– Hrvoje T
Oct 10 '16 at 9:27
1
1
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
usually the config.inc.php is in /etc/phpmyadmin/config.inc.php
– Jostino
Jul 7 '17 at 13:40
add a comment |
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_installationEnter 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!
MySQL password can be changed usingsudo mysql_secure_installation
as well.
– user2513149
Sep 9 '17 at 16:13
add a comment |
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_installationEnter 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!
MySQL password can be changed usingsudo mysql_secure_installation
as well.
– user2513149
Sep 9 '17 at 16:13
add a comment |
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_installationEnter 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!
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_installationEnter 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!
edited Sep 13 '14 at 10:43
Anwar
57.5k22149257
57.5k22149257
answered Aug 13 '12 at 7:30
Amigo ChanAmigo Chan
56956
56956
MySQL password can be changed usingsudo mysql_secure_installation
as well.
– user2513149
Sep 9 '17 at 16:13
add a comment |
MySQL password can be changed usingsudo mysql_secure_installation
as well.
– user2513149
Sep 9 '17 at 16:13
MySQL password can be changed using
sudo mysql_secure_installation
as well.– user2513149
Sep 9 '17 at 16:13
MySQL password can be changed using
sudo mysql_secure_installation
as well.– user2513149
Sep 9 '17 at 16:13
add a comment |
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.
add a comment |
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.
add a comment |
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.
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 '12 at 1:20
jjwdesignjjwdesign
270112
270112
add a comment |
add a comment |
protected by Community♦ Jan 28 '14 at 20:08
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?