From now on, whenever you try to access the phpMyAdmin web interface, you will prompted to enter the additional username and its password that you just configured in the previous step. We have now added an extra layer of security to access phpMyAdmin web interface. You will asked to provide a password for the new user. Replace 'ostechnix' with any username of your choice. Now, run the following command to create a new user, for example ostechnix: $ sudo htpasswd -c /etc/phpmyadmin/.htpasswd ostechnix htaccess within /usr/share/phpmyadmin/ directory using command: $ sudo nano /usr/share/phpmyadmin/.htaccessĪdd the following lines in it: AuthType Basic PHPMYADMIN NOT FOUND UPDATERestart apache service to update the changes using command: $ sudo systemctl restart apache2 htaccess file overrides by editing the /nf file: $ sudo nano /etc/apache2/conf-available/nfĪdd "AllowOverride All" line within the section as shown below. htaccess authentication and authorization functionalities.įirst of all, enable the use of. The most common way to protect phpMyAdmin from unauthorized access is by using Apache's built-in. Since phpMyAdmin is an easy target for attackers, the next recommended task is to secure phpyMyAdmin. Next give the appropriate privileges to the 'phpmyadminuser' using command: GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION įrom now on, you can manage your databases via phpMyAdmin web interface. The password for phpmyadminuser is password. Here, phpmyadmin is the new user for accessing phpmyadmin dashboard. You will now be in mysql shell.Įnter the following command to create a new dedicated user for phpmyadmin: CREATE USER IDENTIFIED BY 'password' To do so, login to mysql shell using command: $ mysql -u root -pĮnter your mysql root password. However, it is recommended to create a dedicated user to manage databases via phpMyAdmin web interface. You can login to phpmyAdmin dashboard using 'phpmyadmin' user or mysql root user. Once phpMyAdmin is installed, a database user named 'phpmyadmin' will be automatically created with the administrative password you set during the installation. Create dedicated user to access phpMyAdmin dashboard You can now verify if mbstring extension is enabled or not by loading into info.php file from the web browser.Īs you can see in the above screenshot, mbstring module is enabled. $ sudo phpenmod mbstring $ sudo systemctl restart apache2 Once phpmyadmin is installed, enable mbstring php extension and restart Apache service o update the changes as shown below. Provide mysql application password phpmyadmin. Configure phpMyAdmin with Apache web serverĬhoose Yes to configure database for phpmyadmin:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |