Mysql Login Error 1045
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn error 1045 sqlstate 28000 access denied for user 'root'@'localhost' more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error 1045 mysql windows Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you,
Mysql Drop Anonymous User
helping each other. Join them; it only takes a minute: Sign up MySQL - ERROR 1045 - Access denied up vote 29 down vote favorite 23 In some way I have managed to get this error when I
Mysql Access Denied For User Using Password Yes
try to access into MySQL via the command line: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I have tried resetting the password without any luck using this HowTo. I have uninstalled mysql completley and reinstalled but I still get asked for a password. I have no idea why this is the case! Can someone please help me get a default install of MySQL. Environment mysql access denied for user root Fedora Core 10, Full Root Access, Apache and PHP installed Thank you for any help!! EDIT To all those that would like to save themselves a few hours of "blood coughing" - when you uninstall MySQl completely delete everything that is left behind. If you don't do this, it will never be a FRESH install. mysql linux passwords mysql-error-1045 share|improve this question edited Jan 8 '10 at 5:28 OMG Ponies 199k37360417 asked Jan 28 '09 at 20:12 Abs 13.3k68208356 2 MySQL error 1045 explained here: webyog.com/faq/content/23/18/en/… –Man_k Aug 6 '12 at 11:01 add a comment| 6 Answers 6 active oldest votes up vote 63 down vote accepted If you actually have set a root password and you've just lost/forgotten it: Stop MySQL Restart it manually with the skip-grant-tables option: mysqld_safe --skip-grant-tables Now, open a new terminal window and run the MySQL client: mysql -u root Reset the root password manually with this MySQL command: UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root'; If you are using MySQL 5.7 (check using mysql --version in the Terminal) then the command is: UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE User='root'; Flush the privileges with this MySQL command: FLUSH PRIVILEGES; From http://www.tech-faq.com/reset-mysql-password.shtml (Maybe this isn't what you need, Abs, but I figure it could be useful for people stumbling across this question in the future) share|improve this answer edited May 4 '15 at 1
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any
Mysql Error 1045 Using Password No
questions you might have Meta Discuss the workings and policies of mysql access denied for user using password no this site About Us Learn more about Stack Overflow the company Business Learn more about hiring mysql access denied for user 'root'@'localhost' (using password no) developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site http://stackoverflow.com/questions/489119/mysql-error-1045-access-denied for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top MySQL - ERROR 1045 http://dba.stackexchange.com/questions/38803/mysql-error-1045-28000-access-denied-for-user (28000): Access denied for user up vote 5 down vote favorite 3 I just installed a fresh copy of Ubuntu 10.04.2 LTS on a new machine. I logged into MySQL as root: david@server1:~$ mysql -u root -p123 I created a new user called repl. I left host blank, so the new user can may have access from any location. mysql> CREATE USER 'repl' IDENTIFIED BY '123'; Query OK, 0 rows affected (0.00 sec) I checked the user table to verify the new user repl was properly created. mysql> select host, user, password from mysql.user; +-----------+------------------+-------------------------------------------+ | host | user | password | +-----------+------------------+-------------------------------------------+ | localhost | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | server1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | 127.0.0.1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | ::1 | root | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | | localhost | | | | server1 | | | | localhost | debian-sys-maint | *27F00A6BAAE5070BCEF92DF91805028725C30188 | | % | repl | *23AE809DDACAF96AF0FD78ED04B6A265E05AA257 | +-----------+------------------+-------------------------------------------+ 8 row
Us MySQL ERROR 1045 (28000): Access denied for user 'root' - Solution Contents[Hide]Symptom:Solution: 1.Symptom: Unable to access MySQL database remotely using root account. Any attempt to access MySQL database will result in https://linuxconfig.org/mysql-error-1045-28000-access-denied-for-user-root-solution error: ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES) 2.Solution: The above MySQL error message is a default behavior of the MySQL server to disallow a Root user to http://www.centos.org/forums/viewtopic.php?t=48938 connect remotely as by default the Root user is allowed to connect to MySQL server on from localhost that is 127.0.0.1. The solution is to create a new admin user. The below access denied SQL commands will create new user called admin and grant remote access: mysql> CREATE USER 'admin'@'%' IDENTIFIED BY ''; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec) Alternative but not recommended solution is to grant remote MySQL access to root user: mysql> GRANT ALL PRIVILEGES ON *.* TO access denied for 'root'@'%' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) The above line will grant a privilege to the root user to connect remotely: $ mysql -u root -ppassword -h 172.17.0.14 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 41 Server version: 5.5.43-0+deb8u1 (Debian) Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> Bye Please enable JavaScript to view the comments powered by Disqus. Free Linux eBooks Java™ Application Development on Linux Linux® Quick Fix Notebook Understanding the Linux® Virtual Memory Manager Managing Linux® Systems with Webmin™ Introduction to Linux - A Hands on Guide An Introduction to Design Patterns in C++ with Qt 4 Linux Device Drivers, 2nd Edition The Official Samba-3 HOWTO and Reference Guide Self-Service Linux®: Mastering the Art of Problem Determination Open Source Security Tools Linux® Patch Management Ubuntu Linux Toolbox: 1000+ Commands User Mode Linux Tradepub EbooksIntroduction to Linux - A Hands on Guidehttp://linuxconfig-org.tradepub.com/free/w_mach01/?p=w_mach01Understanding the Linux® Virtual Memory Managerhttp://linuxconfig-org.tradepub.com/free/w_infk10/?p=w_infk10User Mode Linuxhttp://linuxconfig-org.tradepub.com/free/w_infk09/?p=w_infk09Self-Service Linux®: Mastering the Art of Problem Determinationhttp://linuxconfig-org.tradepub.com/free/w_infk03/?p=w_infk03Linux® Quick Fix Notebookhttp://linuxconfig-org.tradepub.com/free
(28000): Access denied for user Issues related to applications and software problems Post Reply Print view Search Advanced search 3 posts • Page 1 of 1 worldaccordingtojohn Posts: 31 Joined: 2014/08/19 23:20:48 MySQL ERROR 1045 (28000): Access denied for user Quote Postby worldaccordingtojohn » 2014/10/12 20:14:23 Hello All,I've created a MySQL user, assigned a password, and it can't login:[root@flash www]# mysql -u fred -pEnter password:ERROR 1045 (28000): Access denied for user 'fred'@'localhost' (using password: YES)The password is good. I've checked it, reset it, checked it again .... it's good.When I login with no user I can see all the databases I've created:[root@flash www]# mysqlWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 193Server version: 5.5.37-MariaDB-log MariaDB ServerCopyright (c) 2000, 2014, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;+--------------------+| Database |+--------------------+| information_schema || cpgff || galleryff || mysql || performance_schema || test |+--------------------+7 rows in set (0.00 sec)But when I remove the password from my fred user and login as fred I cannot see those databases:[root@flash www]# mysql -u fredWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 217Server version: 5.5.37-MariaDB-log MariaDB ServerCopyright (c) 2000, 2014, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;+--------------------+| Database |+--------------------+| information_schema || test |+--------------------+2 rows in set (0.00 sec)MariaDB [(none)]>I'd like to be able to login with the username 'fred' and gain access to those databases. Any help is appreciated! Top gerald_clark Posts: 10595 Joined: 2005/08/05 15:19:54 Location: Northern Illinois, USA Re: MySQL ERROR 1045 (28000): Access denied for user Quote Postby gerald_clark » 2014/10/12 20:16:10 Read up on the grant command in the MySQL manual. Top TrevorH Forum Moderator Posts: 16883 Joined: 2009/09/24 10:40:56 Location: Brighton, UK Re: MySQL ERROR 1045 (28000): Access denied for user Quote Postby TrevorH » 2014/10/12 21:45:53 Be aware that th