/********************* By garcon1986 *************** * **********************/</P> <p> error <SPAN class = 'wp _ keywordlink '> Code </span> is as follows: <br/> #1045-Access denied for user 'root' @ 'localhost' (using password: Yes) </P> <p> $ CD/etc/MySQL <br/> $ mysql-u root-P <br/> Error #1045 </P> <p> try after many methods, the solution is found on the network. </P> <p> $ CD/etc/MySQL <br/> $ gedit Debian. CNF <br/> found: <br/> User = Debian-sys-Maint <br/> Password = XXXXX <br/> use <br/> $ mysql-u Debian-sys-Maint-p xxxx <br/> logon successful <br/> mysql> set password for 'root' @ 'localhost' = PASSWORD ('newpass '); <br/> mysql> flush privileges <br/> mysql> quit </P> <p> at this time, log On again <br/> $ CD/etc/MySQL <br/> $ mysql-u root-P <br/> and enter the new password, logon successful <br/> mysql> </P> <p> now the problem is resolved.