I've been trying to figure this out for a solid 24 hours.
I'm with GoDaddy for hosting. I have installed MySQL Server and Workbench. I've successfully created my root user with a password on my local server.
I'm trying to send form data using post method to a database I've successfully created with Workbench.
When submitting the form, I keep getting the error: ERROR: Could not connect. Access denied for user 'root'#'localhost' (using password: YES)
I've tried creating a new user and granting all privileges to that new user as well, but it still doesn't work. Nothing is working.
What am I doing wrong?
Related
I am setting up my local development environment using XAMPP for writing websites using Laravel.
The issue im facing is that I cannot connect to the MySQL database with any new user I create. I give one user limited privileges for only one database and cannot connect using the correct password.
I tried making an admin user with full privileges on all databases and tables, and still cannot connect with the correct password.
The returned error is always the same -
SQLSTATE[HY000] [1045] Access denied for user 'laravel'#'localhost' (using password: YES)
and
ERROR 1045 (28000): Access denied for user 'admin'#'localhost' (using password: YES)
where laravel is the username, admin is the other one etc.
This is not related to Laravel as I keep getting this error even when I try to connect from the command line (as shown in error code number 2).
The 'anonymous' user has been removed to make sure MySQL doesn't match it by mistake, I have flushed privileges and restarted services countless times.
The default root user without password can connect, but no new users that I create with passwords can.
Solved the problem by re-installing XAMPP, nothing else.
Running a php script or trying to connect via terminal (locally) I get the same error
Access denied for user... (using password: YES)
mysql -u username -p'password' -h ip db_name
It passes to the server but get's blocked because of password although correct value was provided.
I've tried several fixes associated to this scenario but to no avail.
When a tried to execute some queries which could provide extra info for the fix, I get
1142 - SELECT command denied to user ... for table 'user'
I've assigned username, password and all privileges in cPanel MySql databases section (for the database) but am unable to connect using the created user as if a root user is blocking access to the database.
Am on GoDaddy host.
These are the only actions that I can preform on my database
I have wamp running locally on my computer and was working just fine. I have a web application based on PHP and MySQL. I am using a password for the connection.
Suddenly, I got the following error:
MySQL ERROR 1045 (28000): Access denied for user 'root'#'localhost'
(using password: YES)
I tried to follow the answers of this post on stack. But nothing worked.
Ounce I open the mysql cmd and write down the password, it will close immediately.
I even used MySQL workbench, and I was successful to enter but on a different user with password. But the user I am using where my databases resides, is not accessible anymore.
I have a db called ncd, where I can see it on the other user but as empty.
Could I restore the data from wampserver ?
You can check your db on /mysql/ folder and them store it. And move to another mysql with another account and restore your db with same folder as above me talk it.
I'm a New to mysql.
I was trying to set password to 'root' account. Till then i had no problem with phpmyadmin. after setting the password i'm unable to access to db neither via phpmyadmin nor a new mysql console.
Luckly, i still had the same Mysql console open through which i set my root password. So removed the root password through the same Mysql console. it was successful. But still i'm unable to login via phpmyadmin. I get error as "#1045 - Access denied for user 'root'#'127.0.0.1' (using password: NO)".
But Logging-in via new mysql console is successful. Kind help to resolve this.
Set auth_type in phpmyadmin. (via config.inc.php)
ref: http://wiki.phpmyadmin.net/pma/Auth_types
I recommand :
auth_type = 'http'
i am triying to get care2x to work in centos.
i install all the file needed php apache mysql and for some reason.
while in the care2x setup wizard i get a checklist and the only one not green. is the error below. i tried everything to fix this including setting a password for root.
(I am pretty new with php/mysql/apache)
Could not connect to database server localhost with username root: Access denied for user 'root'#'localhost' (using password: YES)