0

I have seen so many solutions to this problem but I really feel my experience is unique (I wish it wasn't though.. in the past I had no issue with this, but I am now using the latest Fedora (23) and I believe the latest version of mySQL

so basically I was going to start a new sql server and start to import old databases, the problem is I cannot log into the sql server because its asking me for a password right from the get go.

So ... using 127.0.0.1/phpmyadmin certainly gives me the login, but all attempts to get in fail. Interestingly enough 127.0.0.1/phpmyadmin/setup will let me in and when I configure a database (giving it a login and password) those don't work after moving the file config.inc.php .. back a directory AND removing the folder "config". I even try editing the file "config.inc.php" and see what the login name and password is yet STILL it does not let me in.

I'm rebooting the computer, I am running "service httpd restart" between each try ... I cannot get in. Just keeps giving me the same error "

My only assumption is (perhaps) I may have moved a database file that I shouldn't have (from the old to the new), but I'm not 100% sure where they are stored. I assume though it should not be an issue if I am creating a new one though, right? Also (perhaps) I am not moving "config.inc.php" to the right place, perhaps? I am totally lost.

in /var/lib/phpMyAdmin

used to have a config folder (deleted it as instructed after moving config.inc.php back to /var/lib/phpMyAdmin

now I have config.inc.php which looks like the following:

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 4.5.3.1 setup script
 * Date: Mon, 04 Jan 2016 20:15:07 +0000
 */

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

/* End of servers configuration */

$cfg['DefaultLang'] = 'en';
$cfg['blowfish_secret'] = '568acf795d62d3.18588477';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

Additional Details: I tried root w/no password also (no access) Also tried: "mysql -u root password root" and that does not work wither

jabbyjim
  • 11
  • 5
  • 1
    Possible duplicate of [ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)](http://stackoverflow.com/questions/21944936/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-y) – Hardy Mathew Jan 04 '16 at 20:57
  • http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password – E_p Jan 04 '16 at 20:57
  • Is it correct password root? Leave this field as empty string and try – devpro Jan 04 '16 at 20:59
  • leaving empty string for password did not work sadly – jabbyjim Jan 04 '16 at 21:03
  • the rackspace article didn't work either (for some reason got bash: mysqld_safe: command not found..." – jabbyjim Jan 04 '16 at 21:11

2 Answers2

0

Having had this problem before, what fixed it for me was accessing the "phpmyadmin" page from another link. Go to localhost/phpmyadmin instead of using 127.0.0.1/phpmyadmin

Chase Cromwell
  • 1,021
  • 1
  • 7
  • 15
  • Hm... I wonder why that makes a difference. Well it didn't seem to work for me, but maybe your onto something. I'm messing with phpMyAdmin.conf file now. – jabbyjim Jan 04 '16 at 21:23
0

so my answer was found on the MYSQL site.

Apparently there is a temporary password that is produced when you begin.

it can be found doing a ..

[root@Gretchen ~]# grep 'temporary password' /var/log/mysqld.log

which is so weird but it gave me the password and it worked. More security I guess. I can see this throwing off people who have used mysql before without having to jump through that hoop.

jabbyjim
  • 11
  • 5