I'am pretty new with linux and installed a webserver. I installed apache2, php7.0 and mysql-server-5.7.12 + phpmyadmin.
Now i try to login to the mysql-server trough phpmyadmin (with the password i typed during the installation of mysql-server) and it says #1045 - Access denied for user 'root'@'localhost' (using password: YES)
I googled the error but i cant find a WORKING solution. I tryed to reset the root password by reinstalling mysql-server with the folowing commands:
This didn't work so i tryed another way to reset the password: This way is described Here This also not worked for me.
I tryed this also. But also this isn't working for me. I cant come in mysql "prompt" or how it is caled.
I know there are more of the same questions on stackoverflow but these are not working for me......
When i type mysql -u root
or mysql -u root -p
in my terminal i get the same error as in php my admin: https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/
Hope someone can help me becouse i struggle a while with this problem.....
After long try and error i fixed the problem. I did this on this way:
sudo apt-get --purge remove mysql-*
After this my phpMyAdmin had an error that mysqli is missing. To fix this i did:
The installing the mysql-server. For test purposals i tryed to install mysql-server 5.5 and 5.6 but these had allways installation errors. After executing the folowing commands mysql-server-7.6.12 was installed correctly:
sudo dpkg -i mysql-apt-config_0.6.0-1_all.deb
I set the mysqlserver to Mysql Server (mysql-5.7)
and tools to disable
. After this i selected apply
and executed the following commands:
sudo apt-get update
After this i got a question (don't remember exacly what the questionw was but something with an directory wil be......., i anwered with yes). After this question i could configure an root password and login to my phpmyadmin.
@Mitch Jackson, Thanks for the answer anyway, it put me in the right direction ;-)