MYSQL sudo apt install mysql-server php7. Sudo apt install php7.4-curl php7.4-gd php7.4-json php7.4-mbstring php7.4-xmlĪPACHE sudo apt install apache2 libapache2-mod-php7.4 To change the password of the root user in Ubuntu, run the following command as a sudo user: sudo passwd root. In Ubuntu, you can set or change the password of a user account with the passwd command. Use this user anywhere you want "root" access.Īlso make sure you're using the latest verion of PHP. If for some reason, you need to enable the root account, all you need to do is to set a password for the root user. GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION The best solution is to create a new user for PhpMyAdmin (or use the existing one if it was created during install) and grant it the required privileges. This is ok for the CLI, but it means that PhpMyAdmin and ALL other clients will not be able to use root credentials MySQL Have changed their Security Model and root login now requires a sudo. So UPDATE user SET plugin="mysql_native_password" WHERE user='root' This unfortunate lack of coordination has caused the incompatibility to affect all PHP applications, not just phpMyAdmin. There is a workaround, that is to set your user account to use the current-style password hash method, mysql_native_password. Login at root from the CLI: sudo mysql -u root -pĭue to changes in the MySQL authentication method, PHP versions prior to 7.4 are unable to authenticate to a MySQL 8.0 blah blah blah blah. This allows for some greater security and usability in many cases, but it can also complicate things when you need to allow an external program like phpMyAdmin to. Mysql Ver 8.0.19-0ubuntu5 for Linux on x86_64 ((Ubuntu)) In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the authsocket plugin by default rather than with a password. phpmyadmin should use that password so not quite sure what you mean by 'for both'. Mysql> UPDATE user SET authentication_string=password('YOURNEWPASSWORD') WHERE user='root' ĮRROR 1064 (42000): You have an error in your SQL syntax check the manual that corresponds to your MySQL server version for the right syntax to use near '('YOURNEWPASSWORD') WHERE user='root'' at line 1 You can change the mysql root password by logging in to the database directly ( mysql -h yourhost -u root) then run. In the actual ubuntu version it seems that the PASSWORD command is not known. Mysql> UPDATE user SET plugin="mysql_native_password" WHERE User='root' Mysql> UPDATE user SET authentication_string=PASSWORD("NEWPASSWORD") WHERE user='root' Sudo /usr/sbin/mysqld -skip-grant-tables -skip-networking & In Ubuntu 18.04 there was a good tutorial (several): SERVER BEENDEN: It is always a problem to get the root password to login to the localhost/phpmyadmin.
0 Comments
Leave a Reply. |