Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 585 Vote(s) - 3.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access denied for user 'root@localhost' (using password:NO)

#11
1) You can set root password by invoking MySQL console. It is located in

`C:\wamp\bin\mysql\mysql5.1.53\bin` by default.

Get to the directory and type MySQL. then set the password as follows..


> SET PASSWORD FOR root@localhost = PASSWORD('new-password');


2) You can configure wamp's phpmyadmin application for root user by editing

C:\wamp\apps\phpmyadmin3.3.9\config.inc.php

**Note :-** if you are using xampp then , file will be located at

C:\xampp\phpMyadmin\config.inc.php

It looks like this:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOURPASSWORD';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


The error "Access denied for user 'root@localhost' (using password:NO)"
will be resolved when you set `$cfg['Servers'][$i]['AllowNoPassword']` to **false**

If you priviously changed the password for 'root@localhost', then you have to do 2 things to solve the error "Access denided for user 'root@localhost'":


1. if ['password'] have a empty quotes like **' '** then put your password between quotes.
2. change the (using password:NO) to (using password:YES)

This will resolve the error.



Note: phpmyadmin is a separate tool which comes with wamp.
It just provide a interface to MySQL. if you change my sql root's password, then you should change the phpmyadmin configurations. Usually phpmyadmin is configured to root user.
Reply

#12
Use mysql -u root -p
It will ask for password, insert password and enter.
Reply

#13
For some information I've get error after changing password:

> Access denied for user 'root'@'localhost' (using password: NO)
>
> Access denied for user 'root'@'localhost' (using password: YES)

In both cases there was error.

But the thing is after that I've tried it with

`mysql -uroot -ppassword` instead of

`mysql -u root -p password` -> with spaces between -uroot and -ppassword so maybe if someone get trouble can try this way.


Reply

#14
1. Change the password from `config.inc.php` present in `C:\xampp\phpMyAdmin`.
2. Type `mysql -u root -p` in the command prompt.
3. You will be asked to enter the password. Enter that password which you updated in the `config.inc.php`.
Reply

#15
It happens because of the security reason.

try with the following

mysql -u root -p

click enter and enter the password and try again
Reply

#16
If the root account exists but has no password, connect to the server as root using no password, then assign a password. This was my situation when I encountered this issue.

Connect to the server as root using no password:

$> mysql -u root --skip-password

Assign a password:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root-password';

I was able to solve my problem this way. Hope this helps someone who encounters a similar issue in the future. Cheers!

Reference:

[To see links please register here]

Reply

#17
if you changed the port to non standard one, then you need to specify it:
```
$connection = mysqli_connect('localhost:3308', 'root', '', 'loginapp');
```
Reply

#18
Make sure the MySQL service is running on your machine, then follow the instructions from MySQL for initially setting up root (search for 'windows' and it will take you to the steps for setting up root):

[Securing the Initial MySQL Account](

[To see links please register here]

)
Reply

#19
for this kind of error; you just have to set new password to the root user as an admin. follow the steps as follows:


[root ~]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:NO)

1. Stop the service/daemon of mysql running

[root ~]# service mysql stop
mysql stop/waiting

2. Start mysql without any privileges using the following option;
This option is used to boot up and do not use the privilege system of MySQL.

[root ~]# mysqld_safe --skip-grant-tables &

**At this moment, the terminal will seem to halt**. Let that be, and use new terminal for next steps.

3. enter the mysql command prompt

[root ~]# mysql -u root
mysql>

4. Fix the permission setting of the root user ;

mysql> use mysql;
Database changed
mysql> select * from user;
Empty set (0.00 sec)
mysql> truncate table user;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on *.* to root@localhost identified by 'YourNewPassword' with grant option;
Query OK, 0 rows affected (0.01 sec)

*if you don`t want any password or rather an empty password

mysql> grant all privileges on *.* to root@localhost identified by '' with grant option;
Query OK, 0 rows affected (0.01 sec)*
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Confirm the results:

mysql> select host, user from user;
+-----------+------+
| host | user |
+-----------+------+
| localhost | root |
+-----------+------+
1 row in set (0.00 sec)

5. Exit the shell and restart mysql in normal mode.

mysql> quit;
[root ~]# kill -KILL [PID of mysqld_safe]
[root ~]# kill -KILL [PID of mysqld]
[root ~]# service mysql start

6. Now you can successfully login as root user with the password you set

[root ~]# mysql -u root -pYourNewPassword
mysql>

Reply

#20
This means that the user has no access. This can be fixed in the following ways

**make sure the host is set to ´%´**


insert into mysql.user (Host, User, Password) VALUES ('%', 'root', password('setyourpasswordhere'));
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;

or if you are using SQL workbench, you can create an user under

Administration --> users and privileges --> click on Add account button and create a new user, with hosts as **%** and grant the privileges in Administrative roles, schema privileges tabs.

[![enter image description here][1]][1]


[1]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through