Installing phpMyadmin in Ubuntu

Anonim

Installing phpMyadmin in Ubuntu

Almost every web developer with a Ubuntu distribution system interacts with the PHPMYAdmin tool to implement MySQL servers databases through the web interface. Additionally, this component is part of LAMP, on the installation of which we have already spoken on our website within the framework of another material. Today's article will be aimed at inexperienced users who are just starting their acquaintance with web development and wants to install PHPMYAdmin to their computer. Next, we will present a step-by-step instruction that will make it possible to deal with all aspects of the fulfillment of the task.

Install PHPMYAdmin in Ubuntu

Immediately warn you that all subsequent actions will be performed through the "Terminal", so be prepared for the fact that you will have to enter a lot of a variety of teams. We also show how the PHPMYADMIN primary configuration is performed upon completion of the installation. Take as an example, the most popular APACHE web server and MYSQL DBMS. If you now need each of these components, it is better to use the link below, where the LAMP setting is described, and we go directly to the interaction with the component you need today.

Almost always such a simple installation passes without any problems. However, if you have any system problems associated with the package manager, information appears on the screen that the installation failed. This situation should be quickly solved by using the search for corrections of a specific problem through the official documentation of Ubuntu or user forums.

Step 2: Install PHPMYAdmin

This stage is the most basic, since now we will develop the direct installation of the phpMyAdmin component. There are different methods that allow this to do this, and the easiest way will be used by the official repository that we offer to implement in the next instruction.

  1. To install, you will need to enter the Sudo Apt Install PHPMYAdmin command and activate it.
  2. Installing phpMyadmin in Ubuntu after adding special expansion

  3. There will be notified of the need for downloading archives. In the message "Want to continue?" Choose D. option
  4. Entering a superuser password to install phpMyadmin in Ubuntu

  5. Wait for the Console window "Setting the Package". Here, first of all, a web server is specified for automatic configuration. Select your own, then click on TAB to move quickly to the "OK" button.
  6. Selecting a web server for further installation phpMyadmin in Ubuntu

  7. Wait a few minutes so that the packages are completely unpacked. During this operation, do not close the console and do not follow other actions on the PC.
  8. Waiting for the completion of unpacking PHPMYAdmin files in Ubuntu

  9. The "Pack Setup" appears again. Now the database is edited here. Check out the information presented in the window and select the appropriate option.
  10. Go to primary PHPMYAdmin settings in Ubuntu after installation

  11. Create a new password for the database.
  12. Enter the password to access PhpmyAdmin in Ubuntu during installation

  13. Confirm it, re-entered into the form that appears.
  14. Confirm password when creating it in phpmyAdmin in Ubuntu

  15. Specify a convenient method for connecting to the database.
  16. Select a method for connecting to the PHPMYAdmin database in Ubuntu when installing

  17. The service port number will be set automatically. If you have a need to change it, just erase the numbers and specify the required port.
  18. Entering the port for connecting to the phpMyadmin server in Ubuntu

  19. Set the name of the standard database.
  20. Enter the name of the new database when installing phpMyadmin in Ubuntu

  21. Check out the information on the creation of the username.
  22. Information about the correct creation of user meni in phpMyadmin in Ubuntu

  23. Now you have to ask him yourself, pushing out from the read instructions and your needs.
  24. Creating a new user to access PHPMYAdmin DBMS in Ubuntu

  25. Enter another password that will serve to access MySQL to phpMyAdmin.
  26. Password to access the DBMS when installing phpmyadmin in Ubuntu

After the screen displays information about the successful installation of phpMyAdmin in the system. If any problems arose during configuration or unpacking, you will also be notified about them. Options will additionally offer both action options, for example, ignoring the problem, re-attempt to solve it or skip.

Step 3: Creating a new user

During the previous stage, the installation tool offered to create a new user for phpmyAdmin, but some users missed this moment or need to add several more accounts. Let's start our section of the main settings with an instructions for creating a profile.

  1. Open a new session in the Terminal and type Sudo MySQL to start the database.
  2. Starting a database for additional PHPMYAdmin settings in Ubuntu

  3. Be sure to enter a superuser password.
  4. Entering a password for successful launch of PHPMYAdmin database in Ubuntu

  5. As the first command, enter the Create User 'Admin' @ 'Localhost' identified by 'password';, where Admin '@' Localhost is the name of the account, and Password is the password installed.
  6. A command to create a new user in the PHPMYAdmin database in Ubuntu

  7. Set the basic privileges through the Grant All Privileges on *. * To 'admin' @ 'Localhost' with GRANT Option;, be sure to change the name of the user on the previously specified.
  8. A command to install the privileges of the new user phpMyadmin in Ubuntu

  9. Last queue, enter and activate Flush Privileges;.
  10. Finishing command when creating a PhpmyAdmin user in Ubuntu

  11. You will be notified of the successful completion of the operation.
  12. Successful creating a new PHPMYAdmin user in Ubuntu

Almost in the same way, you can create an unlimited number of users who will connect to PHPMYAdmin by entering the name of the account and password from it. Take into account only the installation of privileges for each profile. More information is written in the official documentation.

Step 4: Security

Creating basic security rules for phpmyAdmin is not always the necessary action, but if the server is directly related to an open network, then you should ask at least the basic policies that will help with surface attacks. Let's quickly understand exactly how to configure the server protection.

  1. All further actions will be made by changing configuration files. To do this, you need to use a text editor. Standard solutions can be incomprehensible to novice users, so let's start with the addition of a more convenient solution. Type Sudo Apt Install Nano and click on ENTER.
  2. Setting a text editor to further configure phpMyAdmin in Ubuntu

  3. After successful installation, start the first configuration file through Sudo Nano /usr/Share/PhpmyAdmin/.htaccess.
  4. Starting the PHPMYADMIN security configuration file in Ubuntu

  5. Here in any empty line insert the following four rules.

    AUTHTYPE BASIC.

    Authname "Restricted Files"

    Authuserfile /etc/phpmyadmin/htpasswd.

    Require Valid-User

  6. Installing standard security rules for phpMyadmin in Ubuntu

  7. Use the Ctrl + O combination to save the settings.
  8. Saving changes in a text editor when configuring phpmyAdmin in Ubuntu

  9. When prompted, do not change the name of the object, but simply click on ENTER.
  10. Select a name to save the phpMyAdmin configuration file in Ubuntu

  11. When all settings are saved, press Ctrl + x to close the current file.
  12. Exit the editor after configuring PHPMYAdmin security in Ubuntu

  13. Next, set the new password for the main account, if this has not been done earlier. Activate the sudo hpasswd -c /etc/phpmyadmin/.htpasswd user command.
  14. Running tools for installing a password for PHPMYAdmin user in Ubuntu

  15. In the appeared string, enter an access key acceptable for you and after activation, repeat it.
  16. Entering a new password for the specified PHPMYAdmin user in Ubuntu

  17. It remains only to configure the web server under all the changes made earlier. To do this, open the appropriate file through Sudo Nano /etc/apache/apache2.conf.
  18. Starting a text editor to configure PHPMYAdmin web server in Ubuntu

  19. Insert the lines below and save the changes.

    AllowOverride All.

    Require All Granted

  20. Configuring PHPMYAdmin Web Server in Ubuntu for a new user

All other security settings are carried out on the basis of your needs, taking into account the syntax and general rules that are described in the PHPMYAdmin documentation.

As part of today's material, we told not only about the principle of Installation PHPMYAdmin, but about the main configuration points. Now you know what actions should be done to successfully implement the goal.

Read more