Got Error 1045 Access Denied For User
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss mysqldump access is denied the workings and policies of this site About Us Learn more about
Mysqldump Got Error 1045 Access Denied For User 'odbc'@'localhost'
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Mysqldump Got Error 1045 Access Denied For User When Using Lock Tables
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Mysqldump Error 1044
Join them; it only takes a minute: Sign up mysqldump: Got error: 1045 Access denied up vote 2 down vote favorite I am logged into an AWS instance and trying to copy a mysql database to a .sql file. I am using the command: mysqldump -u [username] -p [databasename] > [database].sql Then entering the password and the following mysqldump access denied when using lock tables message comes up. "mysqldump: Got error: 1045: Access denied for user '[username]'@'localhost' (using password: YES) when trying to connect." I can login directly to mysql using the same credentials as above, but still get the same error. I have tried a bunch of different ways for the command above, but it seems to be an issue with permissions or something similar. The user does have all privileges for the database when looking in phpmyadmin so I am not sure what is wrong? Any suggestions? Thanks mysql mysqldump share|improve this question edited May 19 '14 at 18:40 ρss 2,27661741 asked May 19 '14 at 18:37 KyleBunga 23115 Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask. Also see Where do I post questions about Dev Ops?. –jww Apr 2 at
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 mysqldump got error 1044 access denied for user localhost to database About Us Learn more about Stack Overflow the company Business Learn more mysql error 1045 28000 access denied for user root localhost using password no about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss mysqladmin: connect to server at 'localhost' failed Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 1045 (28000): http://stackoverflow.com/questions/23744866/mysqldump-got-error-1045-access-denied Access denied for user 'root'@'localhost' (using password: YES) up vote 50 down vote favorite 37 I am an electrical engineering who mainly play around with power system instead of programming. Recently, I have been following a manual to install a software suite on Ubuntu. I have no knowledge on mySQL at all, actually. I have done the following installations on my Ubuntu. sudo apt-get update http://stackoverflow.com/questions/21944936/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-y sudo apt-get install mysql-server-5.5 sudo apt-get install mysql-client-5.5 sudo apt-get install mysql-common sudo apt-get install glade sudo apt-get install ntp Then I do me@ubuntu:~/Desktop/iPDC-v1.3.1/DBServer-1.1$ mysql -uroot -proot <"Db.sql" I ended up with the following error message. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) How may I fix it and continue? mysql linux ubuntu share|improve this question asked Feb 21 '14 at 20:52 Sibbs Gambling 3,2351041103 1 This does not seem to be strictly programming-related to me. I flagged it for migration to SuperUser –Uli Köhler Feb 21 '14 at 20:55 add a comment| 12 Answers 12 active oldest votes up vote 54 down vote accepted The default root password is blank (i.e. empty string) not root. So you can just login as: mysql -u root You should obviously change your root password after installation mysqladmin -u root password [newpassword] In most cases you should also set up individual user accounts before working extensively with the DB as well. Update: For MySQL 5.7+ please see answer from @Anshu to this question. That contains more current information. share|improve this answer edited Aug 29 at 13:40 answered Feb 21 '1
1045 25 Jun. 2012 I was working on an OpenStack Essex installation on 2 desktops. Shortly after Ifinished setting up the controller in an all-in-one http://www.tikalk.com/devops/solution-mysql-error-1045-access-denied-userlocalhost-breaks-openstack/ configuration, and while working on the nova-compute node, openstack crashed. The first thing i noticed was an AppArmor popup informing glance-registry has crashed unexpectedly. Further inspection revealed that the 'glance-registry' daemon is starting and crashing in an andless loop. All other OpenStack services were inoperational and the nova log files in /var/log/upstart/nova-* were huge. Greping /var/log/glance/registry.logfor 'error' i access denied found this (on the controller): 2012-06-16 12:57:42 1356 ERROR [glance.registry.db.api] Error configuring registry database with supplied sql_connection 'mysql://glance:openstack@10.0.0.40/glance'. Got error: (OperationalError) (1045, "Access denied for user 'glance'@'ostk-controller1' (using password: YES)") None None This suggested something is wrong with mysql. Testing access from the commandline produced the same error: $ mysql -uglance -popenstack ERROR 1045 (28000): Access denied for user access denied for 'glance'@'localhost' (using password: YES) Wondering what change prvoked this ERROR 1045, i spent hours googling around. There're plenty of ERROR 1045 descriptions, but none of them explained the problem or helped me resolve it - which is the reason for this post. The Problem The logfile of mysqld,/var/log/upstart/mysql.log, reported yet another error: 120618 14:07:31 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.24-0ubuntu0.12.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu) mysqld is alive Checking for tables which need an upgrade, are corrupt or were not closed cleanly. 120618 14:07:36 [ERROR] Cannot find or open table nova/projects from the internal data dictionary of InnoDB though the .frm file for the table exists.Maybe you have deleted and recreated InnoDB data This looked like a DB corruption. Assuming healing it will solve the problem I wasted a few hours on that, in vain. Finally it turned this is a harmless alert that has nothing to do with the Access Denied issue (but is probably a nova bug). Some posts on the subject suggested that the socket permissions prevented