Home computickets # 1045 - Access denied for user 'root' @ 'localhost' (using password:...

# 1045 – Access denied for user ‘root’ @ ‘localhost’ (using password: NO)

Author

Date

Category


Answer 1, authority 100%

This happens due to an attempt to connect to the database without a password, although it is required,
if you did not set a password try entering root, root (login, password)
sometimes, this is the default, you can more accurately see it and, if necessary, disable it by simply deleting the line opposite password in the config
here Z: \ home \ localhost \ www \ Tools \ phpmyadmin \ config.inc.php

Try these steps:
 1. Click stop Denwer
 2. Go to the folder where you have Denver installed, for example (c: \ WebServers \ usr \ local \ mysql-5.1 \) there in the my.cnf file, in it after [mysqld] we write skip-grant-tables.
 3. Now start denver, go to http: // localhost / Tools / phpMyAdmin / in the SQL tab and paste this code MyNewPass is your new password
  UPDATE mysql.user SET Password = PASSWORD ('MyNewPass') WHERE User = 'root';
  FLUSH PRIVILEGES;
 4. Turn off denver, erase skip-grant-tables in my.cnf, start denver
 5. Edit these lines in config.inc.php
$ cfg ['Servers'] [$ i] ['auth_type'] = 'config';
$ cfg ['Servers'] [$ i] ['user'] = 'root';
$ cfg ['Servers'] [$ i] ['password'] = 'MyNewPass';

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions