Can't acces MyPHP

Closed
Roland47 Posts 1 Registration date Saturday March 16, 2013 Status Member Last seen March 18, 2013 - Mar 18, 2013 at 09:05 AM
Bionik Posts 4232 Registration date Thursday August 19, 2010 Status Moderator Last seen August 3, 2016 - Mar 20, 2013 at 07:08 AM
Hello,

I installed Wampp and Joomla2,5,9 on my PC. Joomla seems to work correct, but accessing

phpMyadmin still prompt an error:


#1045 - Access denied for user 'root'@'localhost' (using password: YES)

pphpMyAdmin tried to connect to the MySQL server, but the server refused the connection. Check the machine, the username and password in config.inc.php and make sure that they correspond to the information provided by the administrator of the MySQL server was

Even I filled the pw in apps/config.inc.php

Regards

Related:

1 response

Bionik Posts 4232 Registration date Thursday August 19, 2010 Status Moderator Last seen August 3, 2016
Mar 20, 2013 at 07:08 AM
Hello,

Follow these instructions below:

1-Open the console MySql

2-After typing input and have the mysql prompt>:

3-It is useful to begin by assigning the new password using the following command:
SET PASSWORD FOR root @ localhost = PASSWORD ('yourpassword'); 

4-Then there is no need to reassign the superuser using the following command:
mysql> GRANT ALL PRIVILEGES ON *. * TO root @ localhost IDENTIFIED BY 'mypassword' WITH GRANT OPTION; 

Of course you have to insert the host name and user account with the default password set up in the file 'php.ini' to the next level:

  ; Default host for mysql_connect () (does not apply in safe mode).
 mysqli.default_host = 'localhost'

 ; Default user for mysql_connect () (does not apply in safe mode).
 mysqli.default_user = 'root'

 ; Default password for mysqli_connect () (does not apply in safe mode).
 ; That Note Generally this is a * bad * idea to store passwords in this file.
 ; * Any * user with PHP access can run 'echo get_cfg_var ("mysqli.default_pw")
 ; And reveal this password!  And of course, any, users with read access to this
 ; File will be ble to reveal the password as well.
 mysqli.default_pw = 'mypassword' 

It only remains to make the implementation of host names and user account with the default password in the file 'config.inc.php' the following lines:

$ Cfg ['Servers'] [$ i] ['host'] = 'localhost';

$ Cfg ['Servers'] [$ i] ['user'] = 'root';

$ Cfg ['Servers'] [$ i] ['password'] = 'yourpassword';


Good Luck!
0