Mysql Error Code 1044 Sqlstate 42000
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 error 1045 access denied for user ''@'localhost' to database this site About Us Learn more about Stack Overflow the company Business
Access Denied For User ''@'localhost' To Database 'mysql'
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error 1044 access denied for user ''@'localhost' to database mysql workbench Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Access Denied For User ''@'localhost' To Database Using Password Yes
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'db' up vote 109 down vote favorite 42 I want to begin writing queries in MySQL. show grants shows: +--------------------------------------+ | Grants for @localhost | +--------------------------------------+ | GRANT USAGE ON *.* TO ''@'localhost' | +--------------------------------------+ I do not have any user-id but when I want to make a user I don't have privilleges, access denied for user ''@'localhost' to database php also I don't know how to make privileges when even I don't have one user! mysql> CREATE USER 'parsa'@'localhost' IDENTIFIED BY 'parsa'; ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER pr ivilege(s) for this operation I tried to sign in as root: mysql> mysql -u root -p; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p' at line 1 mysql> mysql -u root -p root; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p root' at line 1 mysql share|improve this question edited Oct 20 '12 at 21:43 the Tin Man 109k22135206 asked Jan 12 '12 at 16:44 Nickool 1,36552651 2 You need to log in as a user with permissions. At least root should have been created when you installed MySQL. –derobert Jan 12 '12 at 16:46 during installation it tell
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Access Denied For User 'root'@'localhost' To Database
and policies of this site About Us Learn more about Stack Overflow
Access Denied For User ''@'localhost' To Database Xampp
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation error 1142 (42000): select command denied to user ''@'localhost' for table 'user' Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it http://stackoverflow.com/questions/8838777/error-1044-42000-access-denied-for-user-localhost-to-database-db only takes a minute: Sign up Error 1044 <42000>: Access denied for user ''@' localhost' to database up vote 1 down vote favorite I started learning PHP since last few days and this is where I'm stuck at. When I try to type 'CREATE DATABASE blog;' in shell, this is the error I get 'Error 1044 <42000>: Access denied for user http://stackoverflow.com/questions/24693440/error-1044-42000-access-denied-for-user-localhost-to-database ''@' localhost' to database' How do I fix this? I found titles to this error but those answer were complicated for me to understand. mysql-error-1044 share|improve this question asked Jul 11 '14 at 8:35 NewbieDeveloper 1111210 1 Please give an update with a closer description of what you are doing. With what user are you logged in? At which point do you try to create the database? –Mainz007 Jul 11 '14 at 8:40 I'm watching the tutorial and following exactly what he's been doing. I first opened the shell, then enter 'mysql' and enter. After that I tried to check databases, so I did 'SHOW DATABASES' and it did showed but there was 8 databases but it shows only 2 in shell. It didn't even showed the one I did manually in phpmyadmin. Then I tried to create a new database with 'CREATE DATABASE blog;' command. Sorry if I'm confusing you with my bad english –NewbieDeveloper Jul 11 '14 at 8:44 Is the tutorial online? Seems like you log in with the wrong
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start 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 http://askubuntu.com/questions/461064/unable-to-create-database-due-access-denied about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 access denied top unable to create database due access denied up vote 5 down vote favorite I just logged in to Ubuntu 12.04 as a normal user (vivek) and opened the terminal to create a database, I wrote: create database Hello; and the error I had is: ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'vivek' If I login as root user then even MySQL is not opening and having the access denied for error message: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) What to do now. mysql share|improve this question edited May 5 '14 at 11:52 Parto 6,575164080 asked May 5 '14 at 11:45 viveksinghggits 135126 1 Which command did you use to connect to MySQL? –Parto May 5 '14 at 11:46 I just wrote mysql to connect to the MySQL –viveksinghggits May 5 '14 at 12:52 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted To login into MySQL as root user, you can use: mysql -u root -p and then enter your MySQL password. To login as another user, you will have to create that user first and grant him privileges. Create the user using - change newuser to the username you want and password to your password of choice. CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; Sadly, at this point newuser has no permissions to do anything with the databases. Therefore the first stage is to grant the user the privileges to do 'things'. To grant all privileges (select, create, delete, update, drop, etc) on all databases and tables, run: GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; To grant a specific privilege on a particular datab