OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

parik

I use Scrapy and wnat to insert the Data in my database.

in my database.py i have

def __init__(self, host='', user='', password='', database=''):
    self.__host     = 'localhost'
    self.__user     = 'root'
    self.__password = 'mypass'
    self.__database = 'drive'
## End def __init__

def __open(self):
    try:
cnx = MySQLdb.connect(self.__host, self.__user, self.__password, self.__database, port="3308")
self.__connection = cnx
self.__session    = cnx.cursor()

except MySQLdb.Error as e: print "\033[31mError %d: %s\033[0m" % (e.args[0],e.args1)

and in manager when i want to connect to mysql with

    self.mysql = MysqlPython(self.host, self.user, self.password, self.db)
    self.connection = MySQLdb.connect(self.host, self.user, self.password, self.db)
    self.cursor = self.connection.cursor()

i have this error:

OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

I read this question and this one but i have already the same eror and i can' access to my database

enter image description here

fjmodi

Check if you are correctly setting the root password, but remember you can reset the password.

First things first.

Stop mysql server

sudo /etc/init.d/mysql stop

Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.

mysqld_safe --skip-grant-tables &

You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.

mysql -u root mysql

update user set Password=PASSWORD('new-password') where user='root';
flush privileges;

exit;

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

From Java

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

From Dev

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) symfony2

From Dev

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

From Dev

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) symfony2

From Dev

lavaral 5 ERROR{ (SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)}

From Dev

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) after set plugin = ''

From Dev

Brew mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

From Dev

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

From Java

Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?

From Dev

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

From Dev

Access denied for user 'root'@'localhost' (using password: Yes) after password reset LINUX

From Dev

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

From Dev

ajax with jsp and mysql : java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

From Dev

PyCharm - Database connection. Access denied for user 'root'@'localhost' (using password: YES)

From Dev

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES)

From Dev

Php Post Insert Error Access denied for user 'root'@'localhost' (using password: YES)

From Dev

Laravel Access denied for user 'root'@'localhost' (using password: YES) in laravel 4.2

From Dev

Locall MySQL DB login Error : Access denied for user 'root'@'localhost' (using password: YES)

From Dev

c3p0 access denied for user 'root'@'localhost' (using password yes)

From Dev

Unable to access MySQL from C# application because of Exception: "Access denied for user 'root'@'localhost' (using password: YES)"

From Dev

rails db:migrate rails aborted! Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)

From Dev

OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

From Dev

django.db.utils.OperationalError: (1045, Access denied for user '<user>'@'localhost'

From Dev

geodjango with mysql getting error django.db.utils.OperationalError: (1045, "Access denied for user

From Dev

OperationalError: (OperationalError) no such column

From Dev

OperationalError: No such Column

From Dev

sqlalchemy OperationalError

From Dev

phpMyAdmin MySQL error # 1045

Related Related

  1. 1

    OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")

  2. 2

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

  3. 3

    SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) symfony2

  4. 4

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

  5. 5

    SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) symfony2

  6. 6

    lavaral 5 ERROR{ (SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)}

  7. 7

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) after set plugin = ''

  8. 8

    Brew mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

  9. 9

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

  10. 10

    Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?

  11. 11

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

  12. 12

    Access denied for user 'root'@'localhost' (using password: Yes) after password reset LINUX

  13. 13

    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

  14. 14

    ajax with jsp and mysql : java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

  15. 15

    PyCharm - Database connection. Access denied for user 'root'@'localhost' (using password: YES)

  16. 16

    Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES)

  17. 17

    Php Post Insert Error Access denied for user 'root'@'localhost' (using password: YES)

  18. 18

    Laravel Access denied for user 'root'@'localhost' (using password: YES) in laravel 4.2

  19. 19

    Locall MySQL DB login Error : Access denied for user 'root'@'localhost' (using password: YES)

  20. 20

    c3p0 access denied for user 'root'@'localhost' (using password yes)

  21. 21

    Unable to access MySQL from C# application because of Exception: "Access denied for user 'root'@'localhost' (using password: YES)"

  22. 22

    rails db:migrate rails aborted! Mysql2::Error: Access denied for user 'root'@'localhost' (using password: YES)

  23. 23

    OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

  24. 24

    django.db.utils.OperationalError: (1045, Access denied for user '<user>'@'localhost'

  25. 25

    geodjango with mysql getting error django.db.utils.OperationalError: (1045, "Access denied for user

  26. 26

    OperationalError: (OperationalError) no such column

  27. 27

    OperationalError: No such Column

  28. 28

    sqlalchemy OperationalError

  29. 29

    phpMyAdmin MySQL error # 1045

HotTag

Archive