0

Ok, I am ready to blow my brains out on this one and before you guys tell me to just look at the right this question has been answered... I have tried every solution as I will outline below. Currently I am trying to setup a dedicated server following this guide: http://openlitespeed.com/threads/server-setup-guide-part-3-centos-openlitespeed-percona-with-pictures.120/

I am already on part 3 where I should be done installing PHP MyAdmin and so far everything has gone off no problem. However when I try to log into PHPMyAdmin I keep getting "#1045 Cannot log in to the MySQL Server". So I poured through all the articles on the right and tried everything so far including: updating the config.php file to include user and pass, my config is as follows:

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] ='myPass';

/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

Now if I login via SSH and move to my root user I can run sudo service mysql stop, then mysqld_safe --skip-grant-tables. From there I can wipe my browser history as some of the solutions suggested a cookie issue. If I do I can now log into root user using any password as long as its not blank regardless if its my actual password or not. But once I am in I can not create databases, however I can modify the user table in the mysql database. I have done so for all 3 entries there for root localhost, 127.etc, and the ::1. I even tried copying all three of those rows and creating a different user with the same password. I then go back to SSH re-enable the mysql service via sudo service mysql start, wipe the browser cookies and what not and bam I can't log in again. Not with root, not with the new user I created. I have done the same process trying UPDATE mysql.user SET Password=PASSWORD('1234') WHERE User='root'; and FLUSH PRIVILEGES; before restarting the server, all to no avail.

Now in step 1 of that guide I did nail down mysql as a secure install, but the guide advises to do that and the guide still assumes by step 3 I should be able to login via the phpmyadmin index file located on my server. I followed the guide to the T and everything went off exactly as the screen shots suggested.

So basically I can stop the service and skip grant tables to get into phpmyadmin but not create databases or do it all via SSH which is not really ideal. Am I missing something here?

Side Note: I had this exact same problem on a Windows7 IIS server while setting it up for my local dev environment, I ended up reverting MySQL versions and problem solved, not sure if that's related but I'd like to stick with the latest version if possible. I also had a LAMP stack setup on this dedicated server that I remove prior to attempting the OpenLite/Percona setup I am doing now.

Save me Stack Overflow codenobi your my only hope!

  • Pretty sure Percona won't work with PHPMyAdmin. Try just a vanilla mysql-server install if Percona is what you are using. – britter Feb 04 '15 at 20:20
  • That would be unfortunate news indeed, however the guide I was following assumed it works just fine. I will research that avenue and post back if that is the case, thank you. – Jeff Alan Midler Feb 04 '15 at 20:21
  • According to Percona's site it should be supported: http://www.percona.com/forums/questions-discussions/third-party-tools/9031-phpmyadmin – Jeff Alan Midler Feb 04 '15 at 20:24

1 Answers1

0

I actually solved this problem. I'm not sure what exactly fixed it I feel a combination of things. I uninstalled and reinstalled percona/mysql with the same problem. I tried grant all privileges on *.* to root@localhost identified by 'myPass' with grant option; and had the same issue.

However I was not logging in as true root I was logging in through user2 which is an admin on the server and elevating to root via su. So instead I stayed as user2, stopped mysql, jumped into mysql via mysql -u root -p, and ran grant all privileges on *.* to user2@localhost identified by 'myPass' with grant option;. Keeping in mind I had already created a user2 via phpmyadmin directly into the user table earlier while I had access with the skip grant tables.

I restarted mysql again bam I can log into phpmyadmin as user2 and I can create databases no problem, not sure why but moving on, thanks guys!