I've just installed phpmyadmin on ubuntu 16.04. When the logo screen shows http://myip/phpmyadmin, and I try to log in it appears: #1045 Cannot log in to the MySQL server. I've tried all posibilities.
Could anyone help me? Thanks
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
** #1045 Cannot log in to the MySQL server** is the results of attempting to login without the proper credentials.
The fact that you are able to get the login screen and attempt to login is an indication that the app Phpmyadmin is properly installed. If there were problems you would see an error on the login screen before trying to login.
The username and password would be something provided by the Administer, or
root, which is the default... and the Administrator's credentials.
Answer the login prompt with the root credentials. This is root as the Username and the root's password for the password.
If you don't know the root credentials, and you are the administrator, you would have to change it the password.
You can do this by following the steps provided in this answer:
mysql doesn't ask for root password when installing
The basic steps is to:
Then login to the PHPMyadmin server as root and set up the credentials you wish to have for the users.
This page suggest the following steps in order to install/use php myadmin:
Install PHP MyAdmin
sudo apt-get update sudo apt-get install phpmyadmin php-mbstring php-gettext
This will ask you a few questions in order to configure your installation correctly.
The only thing we need to do is explicitly enable the PHP mcrypt and mbstring extensions, which we can do by typing:
sudo phpenmod mcrypt sudo phpenmod mbstring
Afterwards, you'll need to restart Apache for your changes to be recognized:
sudo systemctl restart apache2
You can now access the web interface by visiting your server's domain name or public IP address followed by /phpmyadmin: