Fixing phpmyadmin login on MySQL 5.7 and Debian 9 Rumi, May 4, 2018 Once setting up the LAMP stack, you must be wondering to see that you no longer been able to login phpmyadmin using root credentials. MySQL 5.7 changed the secure model: now MySQL root login requires a sudo (while the password still can be blank). I.e., phpMyAdmin will be not able to use root credentials. The simplest (and safest) solution will be create a new user and grant required privileges. 1. Connect to mysql sudo mysql --user=root mysql 2. Create a user for phpMyAdmin Run the following commands (replacing some_pass by the desired password): CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; If your phpMyAdmin is connecting to localhost, this should be enough. 3. Optional: allow remote connections Remember: allow a remote user to have all privileges is a security concern. With this in mind, if you want this user to have the same privileges during remote connections, additionally run (replacing some_pass by the password used in Step #2): CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; 4. Update phpMyAdmin Using sudo, edit /etc/dbconfig-common/phpmyadmin.conf file updating user/password values in the following sections (replacing some_pass by the password used in Step #2): # dbc_dbuser: database user # the name of the user who we will use to connect to the database. dbc_dbuser='phpmyadmin' # dbc_dbpass: database user password # the password to use with the above username when connecting # to a database, if one is required dbc_dbpass='some_pas Related Administrations Configurations (Linux) MySQLMySQL 5.7PHPMyAdmin
Failed to open /var/mail/root : No such file or directory August 21, 2017 If you’re receiving the following message on webmin- “Failed to open /var/mail/root : No such file or directory”. Possible resolution is- rumi@mordor:~$ rumi@mordor:~$ sudo touch /var/mail/rumi rumi@mordor:~$ sudo chown thufir:mail /var/mail/rumi rumi@mordor:~$ sudo chmod o-r /var/mail/rumi rumi@mordor:~$ sudo chmod g+rw /var/mail/rumi rumi@mordor:~$ rumi@mordor:~$ mail No mail for thufir thufir@mordor:~$ Related Read More
Start Docker container after linux boot February 7, 2024 Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker restarts. Restart policies start linked containers in the correct order. Docker recommends that you use restart policies, and avoid using process managers to start containers. Restart policies are different from the –live-restore flag of the dockerd command. Using –live-restore lets you… Read More
IPTables D-NAT Firewall Rule September 2, 2023 # Generated by iptables-save v1.3.5 on Tue Oct 28 23:57:58 2014 *filter :INPUT ACCEPT [2590:547311] :FORWARD ACCEPT [11426:731834] :OUTPUT ACCEPT [3989:328501] -A INPUT -i eth0 -j ACCEPT COMMIT # Completed on Tue Oct 28 23:57:58 2014 # Generated by iptables-save v1.3.5 on Tue Oct 28 23:57:58 2014 *mangle :PREROUTING ACCEPT… Read More