![]() ![]() The next step is to configure Apache to password protect the phpMyAdmin directory and use the. If you want to add an additional user, you can use the same command without the -c flag: sudo htpasswd /etc/phpmyadmin/.htpasswd padmin2 The command above will prompt you to enter and confirm the user’s password. You can choose any username, it doesn’t have to be same as the administrative MySQL user. In this example we are creating a user named padmin. ![]() htpasswd file in /etc/phpmyadmin directory: sudo htpasswd -c /etc/phpmyadmin/.htpasswd padmin To add an extra layer of security we will password protect the phpMyAdmin directory by setting up a basic authentication.įirst we will create a password file with users using the htpasswd tool that comes with the Apache package. To access the phpMyAdmin interface open your favorite browser and type your server’s domain name or public IP address followed by /phpmyadmin: Enter the administrative user login credentials you previously created and click Go. You can use any name you like, just be sure to set a strong password. In our example we named the administrative user padmin. Start by log in to the MySQL server as the root user: sudo mysqlįrom within the MySQL shell execute the following commands which will create a new administrative user and grant appropriate permissions: CREATE USER IDENTIFIED BY 'super-strong-password' GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION We will use this user to login to the phpMyAdmin dashboard and preform administrative tasks on our MySQL or MariaDB server. This user will have the same privileges as the root user and will be set to use the mysql_native_password authentication method. Instead of changing the authentication method for the MySQL user root, we will create a new administrative MySQL user. This means that you can’t authenticate as a root by providing a password. The auth_socket plugin authenticates users that connect from the localhost through the Unix socket file. In Ubuntu systems running MySQL 5.7 (and later), the root user is set to use the auth_socket authentication method by default. Once the installation process is complete, restart Apache for changes to take effect: sudo systemctl restart apache2 The installer will prompt you to choose the web server that should be automatically configured to run phpMyAdmin, choose apache by pressing Space and then Enter. Install the phpMyAdmin package from the default Ubuntu repositories with the following command: sudo apt install phpmyadmin Update the package index and upgrade the system packages to the latest versions: sudo apt update & sudo apt upgrade To install phpMyAdmin on your Ubuntu 18.04 server, follow these steps: ![]() If your domain is not already protected by an SSL you can follow this guide and secure your Apache with Let’s Encrypt on Ubuntu 18.04 Logged in as a user with sudo privilegesĪlthough not necessary, it is recommended to access your phpMyAdmin installation over HTTPS.Have LAMP (Linux, Apache, MySQL, and PHP) installed on your Ubuntu server.Prerequisites #Įnsure that you have met the following prerequisites before continuing with this tutorial: This tutorial covers the steps necessary for installing and securing phpMyAdmin with Apache on Ubuntu 18.04. PhpMyAdmin allows you to manage MySQL databases, user accounts and privileges, execute SQL-statements, import and export data in a variety of data formats and much more. INSTALL phpMyAdmin in Linux CentOS 7 with LAMP - FREE HOSTING for WordPress Part 3 ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |