I am using Xampp that has phpmyadmin. When I try to open phpmyadmin I get this error:
mysqli::real_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: NO)
In my config file the password is "" so nothing basically.
I have added the screenshot as well for the error. How can I fix it? I tried all the other answer of SO but nothing worked for me.
It seems what you are really asking is how to change the root password since you dont know the one that is in place.
The error you get is simply mysql saying, "ya need a password mate"
A quick google leads me to something like this, which seems reasonable https://gist.github.com/susanBuck/39d1a384779f3d596afb19fcad6b598c
Start mysql without the grant tables and change the password. Restart it again, and you should be good to go. I do not have Xampp or Windows, so i cant try it.
The password you are looking for should be written in the mysqld.log from when it was installed. That might save you some trouble changing it. Search the log file for "temporary password"
Related
This is the error I am getting when I run my php file. I have searched over the network and found some tricks to solve the error but all in vain. some of them suggested to change the username and password for the localhost server and some advised to change only the password.
I tried both and ended up crashing phpmyadmin panel. The other user suggested to change the ports of the running servers. I specifically use mamp as I am using mac os.
I tried to change the ports but nothing worked. Afterwards I looked upon many blogs and web-articles but they also proved to be the same. One site advised to change the mamp config by using the terminal application.
When I tried to change the mysql password nothing appeared on the screen and when I approached for changing the phpmyadmin password it reflected error which said that no such directory is found.
I reinstalled mamp several times but no effect.
Please answer as soon as possible because I am stuck here and no one seems to act as a savior for me.
Go to the config.inc.php file
In the file, search for the line
$cfg['Servers'][$i]['password']
and change it to
$cfg['Servers'][$i]['password']='root'
Hope it helps
I am trying use this guys code: https://github.com/daveismynamecom/loginregister in a xampp enviroment. My first error was a connection error. It was easy to solve and just had to cahnge the connection PDO in the config file. Now I get a
SQLSTATE[HY000] [1045] Access denied for user 'database username'#'localhost' (using password: YES)
error. I have looked at every stack q&a and have not found an answer. I didnt change the code from this guys website other than the PDO. any help would be great. Also this was my first time install xampp and I didnt have msql or php before this
[edit] I have never used mysql so how would you set up root permissions and setup a root user. I can log in to the root user from the mysql console by leaving the password blank but I don't know if that is it
[edit v2] I needed to add the user :). Did not know that. but now I am getting a error code 1044 but that is a question for another time
It's not about the code itself - that error comes directly from your MySQL server. Check whether your credentials (user/pass) are correct.
[edited]
I have never used mysql so how would you set up root permissions and setup a root user. I can log in to the root user from the mysql console by leaving the password blank but I don't know if that is it
So did you set a blank password in the config file as well?
I'm trying to simply run php artisan migrate --seed on a new Laravel project but everytime I try, I get the error:
SQLSTATE[HY000] [1045] Access denied for user 'appuser'#'localhost' (using password: YES)
I check my database config file and the correct username and password for the database are there.
I check MySQL Workbench, and the correct user is there with all the schema privileges for the same password.
I tried adding the user with privileges under %, localhost and 127.0.0.1 but same access denied error.
I ran a quick check to make sure Laravel was selecting the right environment for the database connection details and it is.
I've created users hundreds of times and never had this problem. This all started after I updated to the latest MySQL Workbench 6.1.7 after the older version stopped working correctly on Windows 8. Sadly, I don't have the option to even go back and test if the old version fixes the problem since it won't work at all.
At this point I can't get any new database users to connect.
The database server is up and running, and every other previously existing user still connects just fine.
Here is the my.ini file.
Any ideas? I'm hoping I'm just tired and missing something obvious here.
by reading the config file.
[client]
password = mysql
port = 3306
socket = "{$path}/mysql/mysql.sock"
i think you need to comment the string with default password. Probaby it affects something.
I have recent MariaDB, and the password string is commented out in every config file example
I was coding with a working Apache and MySQL Xampp Server.
While coding suddenly the whole project killed his self.. 80% of the functions just crashed and worked wrong. No Error messages, no console messages. Everything seemed working nice, but the most functions just did the wrong.
Then suddenly.. I got error messages, that it can't connect to the MySQL Database. I was shocked and just reboot my PC.
After a reboot, I started Xampp, startet Apache and MySQL. No error messages, the Background of the Modulname changed to "Green (Successfully started)".
Than I started my browser and changed the URL to my project... same error message, can't connect to the MySQL Database.
I went to localhost/phpmyadmin.
In the PhpMyAdmin I tryed to log in and get following error message:
"#1045 Die Anmeldung am MySQL-Server ist fehlgeschlagen" -> "#1045 Login to the MySQL-Server failed"
I tried following in the command line
mysql -u root -password PASSWORD
mysql -u root -p PASSWORD
mysql -u root
Nothing of them worked. Following error message:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
I also downloaded a mysqlreset.bat which does a SQL Update Query and set a new root password. No - it didn't work.
I don't know what happened.
Anyone know this error? I am searching for a solution, but need to quickly get back to work. Meanwhile I will still search around and will response if I found a solution.
if it is not the case that Halcyon say. this mean you computer was shutdown anormaly. for the version xampp in developpment mode this appear currently in mysql and the problem is in :
a big error of save of database.
you can try to go to the path :
..bin\database\mysql-5.6.11\data\
and restore with wokbench data or any soft in the files: .frm, .myd, .myi
next time think to save a backup of informations in .sql
after restore delete xampp and install another like :uwamp
hope this be helpfull
After few re-installs, I de-installed Xampp from the systems menu, deleted the C:/xampp/ directory and installed xampp again. ( Of course I did backups of my C:/xampp/data and C:/xampp/htdocs )
Everything works now perfect. I don't know what the hell gone wrong and I hope it never happens again.
Kind regards
The problem I have is that I'm still getting the message:
Site off-line The site is currently not available due to technical
problems. Please try again later. Thank you for your understanding.
If you are the maintainer of this site, please check your database
settings in the settings.php file and ensure that your hosting
provider's database server is running. For more help, see the
handbook, or contact your hosting provider.
The mysqli error was: Access denied for user 'name'#'localhost'
(using password: YES).
It happend after I accidentaly changed the password to mysql. Shortly after I'd noticed this, I reverted to the previous password which is THE SAME as the one in the settings.php file. But I still get the same message and I don't know why. Is there any other place where the password is kept? What else can be wrong?
I've found the solution to my problem. I've changed the password one more time, but now it contains only letters and digits. And now it works fine.