When trying to reach localhost/phpmyadmin in WAMP, I get the following error:
Error: #1045 - Access denied for user 'root'#'localhost'
Please tell me if I need to reset my password, or how to get it?
The MySQL manual explains how to reset permissions, but the MySQL defaults are username root with a blank password. I don't know if WAMP might have set an alternative default password instead.
Related
I changed the password for the "root" user in phpmyadmin, now i get an error:
MySQL said: Documentation
Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Tried editing the config.inc.php it says i don't have permission to edit.
Tried doing the terminal through xampp and still no luck. Any help?
I installed xammp, apache loads fine, but I ran into an issue where I was getting access denied when trying to open phpmyadmin database, so after a little search, google suggested going to phpmyadmin setting and locate my config.inc file in where the file config has a line that sets $cfg['Servers'][$i]['auth_type'] was set to config like this $cfg['Servers'][$i]['auth_type'] = 'config' on phpmyadmin settings, now after some research I found that people who had the same similar issue changed theirs to cookie like this $cfg['Servers'][$i]['auth_type'] = 'cookie', which I did, now I got the next issue which is a login page, when trying to login I get four errors.
ERROR - 1 Can not log in to the MySQL server
ERROR 2 - mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'#'localhost' (using password: NO)
ERROR 3 - Connection for controluser as defined in your configuration failed.
ERROR 4 - mysqli_real_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: NO)
I then did a little google search and people said to remove the password, set
$cfg['Servers'][$i]['AllowNoPassword'] to true some thing like this $cfg['Servers'][$i]['AllowNoPassword'] = 'true',
have done that but nothing happened, the login page still appears, is there a way to eliminate this, its driving me nuts over here.
THANKS IN ADVANCE...
You're getting two different errors here; phpMyAdmin can be configured to use an optional user (called the 'controluser', 'pma' in your case) for enhanced features. If you haven't created the user, you'll see an error message, but you can edit your config.inc.php to remove or comment out the lines referencing 'controluser', 'controlpass', and 'pmadb' to disable these advanced features. However, that doesn't seem to be your problem here.
The second error message, about the root user not being able to connect, indicates that there's a problem communicating with or authenticating to the MySQL server. You should try connecting from the command line client to see if you're able to connect as the root#localhost user (which is MySQL shorthand for using the socket connection type rather than TCP/IP networking). You can probably test this with mysql -u root -h localhost.
If the AllowNoPassword variable were causing the problem, you should instead see the error message
Login without a password is forbidden by configuration (see AllowNoPassword)
I have setup a MySQL database and I am trying to connect to it from another website.
I get this error when I try to connect to it:
Connection failed: Access denied for user 'myUsername'#'localhost' (using password: YES)
It works fine when I do it in the same website where the database is hosted.
I tried this SQL query:
GRANT SELECT, DELETE, UPDATE ON database.myDatabaseName TO 'myUsername'#'localhost' IDENTIFIED BY 'myPassword';
But I got this error:
#1142 - SELECT,UPDATE,DE command denied to user 'Steve'#'localhost' for table 'myDatabaseName'
I went to the MySQL management in the built-in control panel where I modified permissions of Steve and added the Grant permission, however I still get the same #1142 error.
How can I fix this?
Thanks in advance.
Access denied for user 'myUsername'#'localhost' (using password: YES)
That's where the error is. It says you are attempting to connect to localhost with the username myUsername and a supplied password. However, usually on localhost, especially on windows systems, the user is Root and the password is not set, just an empty string. Check your username on your localhost and your password.
I have MAMP server installed on my Macbook and everything worked fine, until I tried to add a password to the 'root' user of localhost. I selected a password and now whenever I go to localhost:8888/phpmyadmin, the page gives me an error saying:
1045 - Access denied for user 'root'#'localhost' (using password: YES)
It also says that the system tried connecting to MySQL, but MySQL rejected the connection and I have to check my username and password settings.
Why is it acting so weird and how can I get my PHPMyAdmin back to work?
It says I need to check the config.inc.php file, but I can't find that file in the MAMP folder.
the config file should be under:
/Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php
Edit it and verify the username//password used
You can always reset the root password using :
http://www.tech-otaku.com/local-server/resetting-mamp-mysql-root-user-password/
I just installed WAMP server and for creating a new local database, when I clicked phpMyAdmin, i am getting this error,
Error
MySQL said: Documentation
1045 - Access denied for user 'root'#'localhost' (using password: YES)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Can some one please help me??
you are connecting to your local machine. If i am correct wamp does not set any credentials. So you should be fine to login with root and no password.
It's been a while since I have used WAMP (I only use Linux and OSX these days) I seem to remember the following...
In a command prompt enter in the mysql directory :
mysqladmin -u root password NEWPASSWORD
By default a mysql root password is not set yet the phpmyadmin pages are set to to connect with a password.
Dave
If you user has not password connect so. Try do it:
mysql_connect('server','user');
without thrid parameter. If all is right, you are connect to server.
else, if your user has password, you need provide the password correct
mysql_connect('server','user','password_correct');