Tuesday, November 6

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

Hi All,

I have the error(#1045 - Access denied for user 'root'@'localhost' (using password: NO) )

I have read solution on other post that is as follow:-
I'm just to confirm you that it's the solution.

I was writing ( UPDATE mysql ) : so please follow the next steps if you want to resolve your problem with ( #1045 - Access denied for user 'root'@'localhost' (using password: NO):

1 : go to your WAMP icon on your PC desktop screen and LEFT CLICK to open the menu, you will see MYSQL folder, CLICK to see MYSQL CONSOLE, open it.

2: now you have DOS screen ( a black screen ) :

A: if you already set a password, type it
B: if you did not do this step yet, write the following red text
B1: use mysql; and click ENTER on your keyboard
3: now write the following red text and click ENTER :

UPDATE mysql.user SET Password=PASSWORD("YOUR PASSWORD") WHERE User="root";

 your command will execute when you write this sign ( ; ) at the end of your text and click ENTER.

NOTE: replace the password "YOUR PASSWORD" by your password.

4: now write the following red text and click ENTER :

FLUSH PRIVILEGES;

5: and to exit the black DOS screen now, write exit and click enter.

------------------------- we are finished from MySQL now --------------

6: go to WAMP folder ( open your My Computer, click on C driver, and you will see WAMP folder ), click on APPS folder, and than click on your PHPMYADMIN folder ( e.g C:\wamp\apps\phpmyadmin3.5.1) and find the config.inc.php

7: open config.inc.php and find the following orange text:

$cfg['Servers'][$i]['password'] = '';  // MySQL password  (only needed and add your password now that you used in step number 3 like that).

Example:
$cfg['Servers'][$i]['password'] = 'root';

[COLOR="rgb(255, 140, 0)"]$cfg['Servers'][$i]['password'] = 'YOUR PASSWORD; // MySQL password (only needed[/COLOR]

8: now save this modification, and close config.inc.php

9: go to your web browser and type the following link :

http://localhost/phpmyadmin/

and enjoy, this is what happened with me.

1 comment:

Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...