[SOLVED] Permissions and privileges in phpMyAdmin issues

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[SOLVED] Permissions and privileges in phpMyAdmin issues

Postby ysg » 27. October 2011 17:49

Hey all,

I tried setting a password for all of my XAMPP stuff. I made up a password with a '~' character in it and for some reason phpMyAdmin couldn't connect to the MySQL database. Very weird. When I set it to a password that didn't have the '~', it still couldn't connect. I proceeded to just leave the password field blank and clicked the button to login and... it logged in! That doesn't make any sense.

Another issue that I have is the fact that after I logged in... I couldn't create a table in phpMyAdmin in my database. That doesn't make any sense either. It said that I didn't have any privileges setup. My username is lampp, which is the default and _should_ have complete admin privileges, correct?
Last edited by ysg on 28. October 2011 15:19, edited 1 time in total.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: Permissions and privileges in phpMyAdmin issues

Postby JonB » 27. October 2011 19:03

Linux usernames, XAMPP/LAMPP security, and MySQL have exactly ZERO to do with each other

Your Linux username is what you login with
Your XAMMP security stuff is permissions enabled by other applications and/or .htaccess/.htpswd prootcols
your MySQL username to 'do stuff' is 'root'

If you want passwords to work with more than one thing, stick to upper & lower case ASCII alphabetic characters and Arabic numerals (012345789). UNLESS you know the rules, skip periods, underscores, dashes and any other special characters.

OTAY???

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Permissions and privileges in phpMyAdmin issues

Postby ysg » 27. October 2011 21:53

JonB wrote:Linux usernames, XAMPP/LAMPP security, and MySQL have exactly ZERO to do with each other

Your Linux username is what you login with
Your XAMMP security stuff is permissions enabled by other applications and/or .htaccess/.htpswd prootcols
your MySQL username to 'do stuff' is 'root'

If you want passwords to work with more than one thing, stick to upper & lower case ASCII alphabetic characters and Arabic numerals (012345789). UNLESS you know the rules, skip periods, underscores, dashes and any other special characters.

OTAY???

8)

Right, I know that those are different passwords :-) . I wasn't sure about how everything gets authenticated.

When I go to localhost, the username is lampp.
In phpMyAdmin, the username is also lampp. However, in here I can't create new databases... why? The root username for MySQL is root? How do I make phpMyAdmin aware of this so that it can access my database as root and so that I can do whatever?
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: Permissions and privileges in phpMyAdmin issues

Postby ysg » 27. October 2011 22:22

I just unpackaged XAMPP from scratch and proceeded to have another go at it. I opened up phpMyAdmin and... I still can't by default create databases in MySQL, but I was able to do so before.

What is going on here? I don't get it.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: Permissions and privileges in phpMyAdmin issues

Postby JonB » 28. October 2011 00:12

How do I make phpMyAdmin aware of this so that it can access my database as root and so that I can do whatever?
ysg


Edit /opt/lampp/phpmyadmin/config.inc.php (as root)

Find the config.inc.php file and change the line:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'cookie';

To
:
Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'http';


This will require you to enter the database login details to use PMA. - then enter 'root' as the user name (provided a password has been set for 'root' in MySQL)
http://wiki.phpmyadmin.net/pma/Config

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Permissions and privileges in phpMyAdmin issues

Postby ysg » 28. October 2011 14:24

JonB wrote:
How do I make phpMyAdmin aware of this so that it can access my database as root and so that I can do whatever?
ysg


Edit /opt/lampp/phpmyadmin/config.inc.php (as root)

Find the config.inc.php file and change the line:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'cookie';

To
:
Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'http';


This will require you to enter the database login details to use PMA. - then enter 'root' as the user name (provided a password has been set for 'root' in MySQL)
http://wiki.phpmyadmin.net/pma/Config

Good Luck
8)

Just tried that, it didn't work at all. Still can't create databases through phpMyAdmin.

And yes, after making that change, I did sudo ./lampp restart and still no change.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: Permissions and privileges in phpMyAdmin issues

Postby JonB » 28. October 2011 15:01

1. Are you getting a login prompt for phpMyAdmin? (right before you see the main screen)

Image

2. What are you putting in at that login?

3. On the 'Home' phpMyAdmin page - what does it say in this area (over to the right).

Image
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Permissions and privileges in phpMyAdmin issues

Postby ysg » 28. October 2011 15:19

Ok, now it seems to work... weird...

I removed /opt/lampp, then unpackaged 1.7.7 (which is what I had before), ran sudo ./lampp security and put in the same password everywhere (all lower-case letters with some numbers) and then went to the phpMyAdmin page, had the user as root and then typed in the password and all was good...
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04

Re: [SOLVED] Permissions and privileges in phpMyAdmin issues

Postby ysg » 28. October 2011 15:20

I think the issue was with how I was logging into phpMyAdmin. Initially I was using the user lampp, not root.
ysg
 
Posts: 13
Joined: 06. October 2011 14:33
Operating System: Ubuntu 11.04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests