0

I have a local Web that can be accessed every day from some other pc. I have done are:

  • I set the root password for MySQL
  • Then I have to adjust it to the database password (database.php) ---> that can still access my local web. And it works.
  • Then I set the password for phpmyadmin via localhost / security (I enter the same password). But the first problem arises when this time I could not access to localhost / phpmyadmin, but sorry I forgot to printscreen description of what appears in the red box.

  • I'm looking for a solution and it was suggested to adjust also the password that has been made in config.inc.php. but this error persists and still can not access to phpMyAdmin.

  • I try to find a solution and I found another way to get in by using 127.0.0.1/phpmyadmin address to access it. And made it into phpmyadmin.

  • In this case I concluded that I failed to set a password phpmyadmin. Then I tried to set the password again via phpMyAdmin users click the tab --- I select root and edit the root password, then click generate (still with the same password). So from this peak....

  • After all of this... ultimately what happens is I can not access my local web, with the following caption:

A Database Error Occurred Unable to connect to your database server using the Provided settings. Filename: C: \ xampp \ system \ Database \ DB_driver.php Line Number: 124

At the same time I can not access also to phpmyadmin despite entering the correct username and password ... stupidly before this I did not make a backup of the database and htdocs first.

I want to go back to my local web access and phpMyAdmin as well.

I concluded that I had made a mistake so that the database has been locked, so it can not accessed my local web.

This is my config.inc.php

$cfg['Servers'][$i]['auth_type']     = 'cookie';      
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
halfer
  • 19,824
  • 17
  • 99
  • 186
yuri90
  • 83
  • 1
  • 1
  • 10
  • Please provide your config.inc.php with passwords masked. Also, are you able to access phpmyadmin login? What is the error? – EternalHour May 14 '15 at 09:44

1 Answers1

0

maybe you can try reset your mysql root password.

first you need shut down your mysql server

# server mysqld stop

use safe mode

# mysqld_safe --skip-grant-tables &

login mysql

# mysql -u root

use sql command to update your password

mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("password") WHERE User='root';
mysql> flush privileges;
mysql> quit

restart your mysql server

# service mysqld restart

try to login your phpMyadmin again, wish helpful.

EternalHour
  • 8,308
  • 6
  • 38
  • 57
  • how can I use this command? ' # Server mysqld stop # Mysqld_safe --skip-grant-tables & # Mysql -u root ' whether using a command prompt or mysql.exe? sorry I'm a beginner – yuri90 May 15 '15 at 01:29
  • finally I found this http://stackoverflow.com/questions/4124447/reset-root-password-with-wrong-mysql-config and it works well for me :) – yuri90 May 15 '15 at 08:36