Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get access to PHPmyAdmin after setting a root password and using Instant Rails

Wanted to get started with Ruby on Rails so I installed instant rails and set up a mysql password. Problem is now I can't get access to phpmyadmin.

From the rails control panel, when I go to configure >> database (via PhpMyadmin) it opens up phpmyadmin with the message

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password:

NO)

When I used to use XAMPP after setting a password instead of taking me directly within phpmyadmin (as it did without a password) it took me to the login screen instead. With instant rails that's not the case. Anyone had this problem when they first set a mysql password and using the instant rails package?

like image 232
Derek Avatar asked Apr 03 '10 02:04

Derek


People also ask

Why phpMyAdmin is not opening?

You may receive an error message stating that phpMyAdmin needs a PHP version within a specific range. This might happen if you're running an outdated version of PHP, or a new update is not compatible with your version of MAMP. In this case, you”ll need to change the PHP version of your MAMP application.

How do I log into phpMyAdmin as root?

Access the phpMyAdmin console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin. Log in to phpMyAdmin by using the following credentials: Username: root. Password: application password.

How do I give access to phpMyAdmin?

For security reasons, phpMyAdmin is accessible only when using 127.0. 0.1 as the hostname. To access it from a remote system, you must create an SSH tunnel that routes requests to the Web server from 127.0.


2 Answers

Edit your phpmyadmin config.inc.php file :

Path For Config Page is wamp\apps\phpmyadmin3.4.5\config.inc.php

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

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

$cfg['Servers'][$i]['port'] = '3306';

$cfg['Servers'][$i]['socket'] = '';

$cfg['Servers'][$i]['connect_type'] = 'tcp';

$cfg['Servers'][$i]['extension'] = 'mysqli';

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

$cfg['Servers'][$i]['user'] = '**your-root-username**';

$cfg['Servers'][$i]['password'] = '**root-password**';

$cfg['Servers'][$i]['AllowNoPassword'] = true;
like image 70
Vikas Ck Avatar answered Sep 30 '22 06:09

Vikas Ck


Check following lines in config.inc.php in phpmyadmin directory

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'yourpassword';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

if your root account dont use any password set 'AllowNoPassword' to 'TRUE'

like image 41
Uday Sawant Avatar answered Sep 30 '22 06:09

Uday Sawant