![]() ![]() htaccess config file in the default phpMyAdmin directory to set up the authentication. Save the changes and exit the editor (Ctrl + O and Ctrl + X in nano). Next, you should use the apache2 authentication functionality to set up an additional layer of password-based protection.Īdd the AllowOverride All directive in the directory configuration section to do this. sudo nano /etc/phpmyadmin/nfĬhange the Alias entry to something else, or simply append some random strings to the Alias name. Open the phpMyAdmin Apache config file with your preferred text editor. For starters, you should change the default directory alias. ![]() PhpMyAdmin isn’t secure enough by default, so it’s important to take steps to lock things down yourself. ![]() You can use the root user or the user you just created to log in. ![]() Now, you can access the phpMyAdmin dashboard from a web browser. CREATE USER IDENTIFIED WITH caching_sha2_password BY 'password' GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION FLUSH PRIVILEGES EXIT Accessing phpMyAdmin Don’t forget to replace the username and password values with your own before executing the commands. Use the following statements to create the user and grant them the necessary permissions. To do this, first log in to MySQL as root. While you can grant this user the necessary permissions, we recommend creating a new user rather than using the default user. The default phpMyAdmin user only has limited permissions. sudo phpenmod mbstring sudo systemctl restart apache2 Creating New phpMyAdmin User sudo mysql -u root -p INSTALL COMPONENT "file://component_validate_password" exitįinally, enable the mbstring PHP module and restart the Apache server to apply the changes. sudo apt install -y phpmyadminĪfter installing phpMyAdmin, you can log in as the root user and re-enable the Validate Password plugin. Then, follow the same process as earlier to install phpMyAdmin. UNINSTALL COMPONENT "file://component_validate_password" exit Temporarily disable the Validate Password component and exit the MySQL prompt. Press Tab and Enter to proceed to the next screen and select the abort option there. Let’s go over how you can bypass this error. It’s standard procedure to enable the Validate Password option when securing MySQL, but you’ll encounter an error when setting the password due to this plugin. Then, select Yes when prompted to configure the database for phpMyAdmin with dbconfig-common.įinally, set a password for the phpMyAdmin MySQL user. Press Space to select apache2, then Tab and Enter to proceed. When prompted to configure the web server, apache2 will be highlighted. sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl Note: If you installed a PHP version different from the one currently in the repository, you’ll need to adjust the module versions accordingly in the command below (e.g.,php8.2-zip instead of php-zip). These will add extra functionality like adding JSON support, providing the curl module, etc. Now, install phpMyAdmin along with some other packages recommended in the official install docs. While there are multiple ways to install phpMyAdmin, we recommend installing it directly from the Ubuntu repository for the best integration.įirst, update your package index so that you have access to the latest packages. Additionally, as it’s a common attack vector, it’s important to properly secure it after the installation. You must set up a LAMP/LEMP stack on your server before installing phpMyAdmin. It can be a convenient alternative for users that don’t like administering MySQL from the command line. PhpMyAdmin is a PHP-based web interface for managing MySQL databases. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |