1

I use Ubuntu 12.04. Recently I have installed XAMPP 1.8.1 in my system. I set password to: XAMPP pages, MySQL/phpMyAdmin, MySQL root and FTP.

But after that when I try to login to phpMyAdmin page with username 'root' and my assigned password, it doesn't login and shows a page like:

enter image description here

Also when I click on 'CD Collection' item from the left panel of my XAMPP page it shows:

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /opt/lampp/htdocs/xampp/cds.php on line 64
Could not connect to database!
Is MySQL running or did you change the password?

Oh! another thing, I edited the /opt/lampp/etc/extra/httpd-xampp.conf file to:

<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require all granted
</Directory>

but no success...

I am complete newbie to php, mySQL, FTP and this XAMPP. Could anyone please tell me how can I login to my phpMyAdmin page??? did I do anything wrong???

Mitch
  • 109,787
rim
  • 11

3 Answers3

2

A confusing point for almost everyone who starts using mysql is that 'root' and 'root@localhost' are two different roles and as such could (and some would argue that they actually should) have different passwords. It is quite possible you are trying to log-in as user 'root@localhost' and you are providing the password for 'root' role.

If this is the case, you can remedy it quite easily. Log-in to the database server using the CLI tool mysql as user root like this:

mysql --user=root --password

The tool will ask for your root password (not system root but database root). Now you can modify the password of 'root'@'localhost' like this:

UPDATE mysql.user SET Password=PASSWORD('cleartext password')
  WHERE User='root' AND Host='localhost';
FLUSH PRIVILEGES;

Now try to log-in through phpMyAdmin using the newly set password.

hmayag
  • 2,266
  • 5
  • 22
  • 24
1

Check the following articles:

https://help.ubuntu.com/community/MysqlPasswordReset

How to change root password for mysql and phpmyadmin

Ahmadgeo
  • 1,421
0

I have, after 3 days of searching, got my phpMyAdmin working.

Step 1

Purge the old phpMyAdmin from the system with:

sudo apt-get purge phpmyadmin

You are offered the option of saving any info or deleting the whole lot.

Step 2

Download and install the whole caboodle again with

sudo apt-get install phpmyadmin

As you install you are asked for the Admin password (This is the password which you log in with)

Next you are asked for a password to access the phpMyAdmin UI.

Enter a new password here (I'll pretend that this is a123z ) Then confirm your password by entering it in the next box.

The script will end soon after

Step 3

Logging in to phpMyAdmin

The phpMyAdmin can be found at http://localhost/phpmyadmin/

Your username is: root

Your password is: a123z

(Not your log in password!) That's it, you are in and running.

Simon
  • 4,843