Php Error Creating Database 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 the workings and policies of this site About Us Learn more about Stack Overflow
Mysql Error 1044 Access Denied For User Localhost To Database
the company Business Learn more about hiring developers or posting ads with us Stack access denied for user ''@'localhost' to database 'mysql' Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of
Error 1045 Access Denied For User ''@'localhost' To Database
6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Can't create a MySQL database with PHP on server? up vote 1 down vote favorite I keep getting access denied for user ''@'localhost' to database using password yes this error, and I'm not really sure why this isn't working here. I'm trying to create a database with PHP and it's returning the following error: Error creating database: Access denied for user 'scriptcooke'@'10.%' to database 'my_db' I believe I have the correct credentials, but what does @10.% even mean? NOTE: I'm trying to use the w3schools code example here: php mysql database connect share|improve this question edited Dec 18 '12 at 17:22 hakre 134k26216390 asked Aug 21 '11 at 2:48 John Doe 16193287 There are also mysql account permissions for CREATE TABLE actions. That account doesn't have them. –mario Aug 21 '11 at 2:51 add a comment| 5 Answers 5 active oldest votes up vote 1 down vote accepted @10.% is the field for the source host in the user definition. The problem is: You don't have the permissions to create a new database. The user you are using may only use his own database; share|improve this answer answered Aug 21 '11 at 2:51 Thomas Berger 1,417623 add a comment| up vote 0 down vote The 10. Refers to the subnet's IP's first octet. In English, it's referring to the network "portion" that the user is connecting from. Try @localhost or @.* share|improve this answer answered Aug 21 '11 at 2:52 jschorr 2,6071917 add a comment| up vote 0 down vote
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
Access Denied For User ''@'localhost' To Database Php
Discuss the workings and policies of this site About Us Learn access denied for user 'root'@'localhost' to database more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask
Error 1044 (42000): Access Denied For User 'root'@'localhost' To Database
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: http://stackoverflow.com/questions/7135997/cant-create-a-mysql-database-with-php-on-server 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 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 http://askubuntu.com/questions/461064/unable-to-create-database-due-access-denied 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 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,620164080 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
that make connections all over the world. Join today Community Community Home Getting Involved Chat Forum SupportInstalling Drupal mysqladmin: CREATE DATABASE failed; error: https://www.drupal.org/node/34335 'Access denied for user: '@localhost' Posted by titus14 on October 17, 2005 at 8:54am i am using command line to create my database. when i key in mysqladmin -u dba_user -p create drupal it prompts me to enter password. i leave it blank and hit enter. it show this error mysqladmin: CREATE DATABASE failed; error: 'Access denied for user: access denied '@localhost' to database 'drupal'' When i enter other password it show this error mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'dba_user@localhost' (Using password: YES)' i am a newbie can anyone help me thanks in advance... Log in or register to post comments Comments Couple of possibilities pobster commented October 17, 2005 at 9:03am access denied for When you installed mysql you needed to create a password for the root user. You've either not set it, or you've forgotten what you've set it to ;o) On my system I set it the same as my log in password so that I don't forget it. If you haven't set it at all, you'll be able to type this: mysqladmin -u root password mypassword (obviously don't take that literally! Change 'mypassword' into your password!) There's some instructions on setting up mysql here: http://www.gentoo.org/doc/en/mysql-howto.xml I like Gentoo :o) Many wiki :o) Pobster Log in or register to post comments i try to change the root titus14 commented October 17, 2005 at 9:16am i try to change the root password. but the same error appeared again Log in or register to post comments Thanks! morisy commented July 5, 2008 at 6:44pm Just wanted to say thanks ... I just had this problem and pobsters tip helped me fix my installation on Mac OS X after hours of befuddlement. Log in or register to post c