![]() Then save ctrl + o, ENTER and exit nano ctrl + x. Then copy and past the following code inside the file: AuthType Basic htaccess file inside phpMyAdmin’s directory: sudo nano /usr/share/phpmyadmin/.htaccess Restart Apache: sudo systemctl restart apache2 Then save ctrl + o, ENTER and exit nano ctrl + x We need to add AllowOverride All directive under the DirectoryIndex index.php line: conf file: sudo nano /etc/apache2/conf-available/nf This step is optional, but highly recommended. PhpMyAdmin is one of the top targets for hackers due to it’s popularity, so it’s a good idea to further secure it using Apache’s. Grant your new user with all privileges (replace richie with your new username) then flush privileges and exit: GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION FLUSH PRIVILEGES exit Secure phpMyAdmin (Optional) This step is optional.Ĭreate the new user (replace richie with your preferred username, and password with a strong password): CREATE USER IDENTIFIED WITH mysql_native_password BY 'password' Rather than use the default phpMyAdmin user, you can also create a dedicated user. Now head to your web browser and enter the following URL replacing with your domain name: įor username enter phpmyadmin then enter the password you used when installing the phpMyAdmin package: Create a Dedicated phpMyAdmin User (Optional) The restart Apache/PHP: sudo systemctl restart apache2 We need to enable the mbstring PHP module for phpMyAdmin to work: sudo phpenmod mbstring Once phpMyAdmin has finished installing, enable the Validate Password Component: INSTALL COMPONENT "file://component_validate_password" Enabling PHP Modules Install phpMyAdmin: sudo apt install phpmyadmin Uninstall the Validate Password Component: UNINSTALL COMPONENT "file://component_validate_password" ![]() Select abort and OK, then follow these instructions. If so, you’ll need to temporarily disable this feature. If you followed my guide How to install a LAMP stack on Ubuntu 22.04 and chose to enable the Validate Password Component, you may get error 1819 (HY000) when entering the password for phpMyAdmin. Otherwise skip to the next section: Enabling PHP Modules. If you received Error 1819, keep reading.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |