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
Related
I have a weird issue where I'm trying to connect phpMyAdmin to a remote server. It wasn't working at all so I was messing around with mysql in command line on the db server (no phpMyAdmin on the db). I used skip-grant tables so I could reset the root user and add myself as a user with all privileges:
GRANT ALL PRIVILEGES ON *.* TO 'myusr'#'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
I accidentally tried logging into PHPmyadmin at this time and it worked! Full access - can see everything in the remote DB. I know it's connected properly because changes I made in command line were showing in phpMyAdmin on the web server.
Now I stop mysqld_safe and restart the service on the db and everything dies again. I keep getting the unhelpful "Cannot log in to the MySQL server" message on phpMyAdmin without any other information. I tried tracing the connection in phpMyAdmin and setting values to test the db connection and results, but that's not working as well as I hoped.
I'll keep hacking, but I'm hoping someone has an idea what to do in this case? All the values appear to be configured correctly since it DOES connect to the db if I turn off all security. I can log into my user commandline using the same name and pass on the db server.
What else could I be missing?
EDIT: I stopped being dumb and trying to hack phpMyAdmin and made my own test php script that simply runs a mysqli_connect() attempt and returns the detailed error. I'm getting the following:
SQLSTATE[28000] [1045] Access denied for user 'myusr'#'prodserverFQDN' (using password: YES)
Ok. I kept researching while waiting for a response and I found something that works. Apparently I didn't enclose my password in quotes or something when I created the user commandline.
To fix it, I used mysqld_safe --skip-grant-tables on the db server so I could log in with phpMyAdmin. Using phpMyAdmin, I edited the user to change the password (via edit, not SQL to prevent shennanigans). Now I can log in like normal without using the "no security" option on my db server.
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 just hard rebooted my server for the first time within 7 months. So basically what happened is, I can't login to phpmyadmin anymore.
Everything worked fine but now when I try to access it with my root credentials I get: #1045 Not possible to login in the mySQL server
I have a password currently set in the config.inc.php and it's permissions are 644. Running on CentOS.
Config: http://pastebin.com/4envkWRw
Can anyone help me?
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 had installed wamp server and joomla on my local machine. It was giving phpmyadmin no access error 1045. I followed some instructions on the net and everything was fixed. I had to delete that installation because on error in joomla installation. Now when I am trying to install wamp again I am getting the same phpmyadmin error. Tried everything but could not get it working.
Sounds like you might be using the wrong username, password, or host to log in. Or have a mismatch between what you think it's set as, and what it really is set as in the database.
Or phpmyadmin's config.inc.php file has the wrong account info, or is using the wrong method to log in.
Try another WAMP package and be careful when changing database account info (know what the account's Host field is for, it should always be localhost or 127.0.0.1).
http://en.wikipedia.org/wiki/Comparison_of_WAMPs
Have you tried entering your root password into the config.inc.php file (found in Wamp's apps > phpmyadmin folder)? (Also, have you seen this thread at Wamp's official site?)