Internet Windows Android

Install phpmyadmin ubuntu from the archive. Installing PhpMyAdmin Ubuntu on Nginx or Apache

phpMyAdmin is a LAMP application built specifically for administration MySQL servers. Written in PHP and accessible via a web browser, phpMyAdmin provides a graphical interface for database administration tasks.

Installation

Before installing phpMyAdmin, you need access to the MySQL database on the same computer where you install phpMyAdmin, or on a remote computer accessible over the network. See MySQL section for details. To install in the terminal enter:

Sudo apt-get install phpmyadmin

When prompted, select which web server will be configured for phpMyAdmin. This section assumes use as a web server Apache2.

Sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf sudo a2enconf phpmyadmin sudo /etc/init.d/apache2 reload

In your browser, go to http: // localhost/ phpmyadmin... On the login page enter root as a username, or another user if you configured one, as well as the password for this MySQL user.

If in the previous step, when you go to the address http: // localhost/ phpmyadmin, server gives error 404 - Not found, check file location phpmyadmin.conf... In case of ubuntu 12.04: if the file is missing at the address /etc/apache2/conf.d/phpmyadmin.conf and at the same time exists at the address /etc/phpmyadmin/apache.conf then move the file and restart the server: sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf sudo /etc/init.d/apache2 restart

After that, try logging in through your browser again.

Customization

The phpMyAdmin configuration files are located in / etc / phpmyadmin. The main configuration file is /etc/phpmyadmin/config.inc.php. This file contains configuration options that apply to phpMyAdmin globally.

To use phpMyAdmin to manage MySQL on a different server, configure the following entry in /etc/phpmyadmin/config.inc.php:

$ cfg ["Servers"] [$ i] ["host"] = "db_server";

Replace db_server to the current IP address of the remote database server. Also make sure that the phpMyAdmin machine has permission to access the remote database.

Once configured, log out of phpMyAdmin and log in again and you will be able to access the new server.

The config.header.inc.php and config.footer.inc.php files are used to add HTML top and bottom headers for phpMyAdmin.

When working with MySQL databases (o), phpMyAdmin is the most popular and accessible tool for managing databases, especially for beginners.

phpMyAdmin is an open source PHP web application that provides a web interface for administering MySQL DBMS. PHPMyAdmin allows you to administer your MySQL server through a browser, run SQL commands, and view the contents of tables and databases.

Let's start installing:

1. Enter the phpMyAdmin installation command:

sudo apt-get install phpmyadmin

The installer will offer a list of additional packages required to install phpMyAdmin - agree and press Enter.

2. Select apache2 (moving in the dialog box - the "Tab" key, selection - "Space"):

3. After installing the packages, the installer prompts you to configure phpMyAdmin for the first time:

Enter the password for the administrative account:

Enter the password to connect to the database server:

Confirm password:

Installation is complete. Launch your browser and enter http: // [our domain address] / phpmyadmin:

Enter the root login and password that we specified in the settings:

Have a nice work).

There are few really effective solutions for working with databases. Basically, several programs and solutions are actively used. PhpMyAdmin is known for being able to work without direct input in the SQL query language, providing simplicity and loyalty to the novice user. Installing phpMyAdmin Ubuntu is a trivial task for a professional. A beginner, on the other hand, may encounter some surprises and controversial points.

How to install and configure phpMyAdmin on Ubuntu.

phpMyAdmin is a traditional open source web application released under the GNU GPL license. That is, everyone can use the program for any purpose, as well as change its code and modify the software. The application allows you to perform various tasks for administering the MySQL database management system, query language commands, and view databases. And all this is available directly from the browser!

The program has really gained considerable popularity. It is widely used in various free and commercial projects, and PHP experts can freely embed their functionality into it. We will now take a quick look at what to do before installing phpMyAdmin on Ubuntu.

What's the first thing to do?

Before installing phpMyAdmin ...

First of all, make sure you have the required rights. There is no need to gain root privileges, but sudo privileges must be present.

Second, your server must have LAMP configured. This is a stack of Linux technologies (including Ubuntu), Apache web server, MySQL DBMS and PHP programming language. There is no point in continuing to work without these technologies.

Third, get yourself a domain with an SSL / TLS certificate. It is known that the phpMyAdmin Server installed on Ubuntu is often attacked. If you need to protect the server from threats, it is better not to connect to it via an insecure (HTTP) connection.

Further actions

To start installing the phpMyAdmin application on Ubuntu Server, you need to update the package information:

"Sudo apt-get update"

"Sudo apt-get install phpMyAdmin php-mbstring php-gettext"

When setting up phpMyAdmin for the first time, Ubuntu will need more information. Select the "apache2" server. Answer Yes to the question about using "dbconfig-common". Then enter the administrator details where necessary. After that, enter and repeat the password for the program itself.

For now, enable PHP extensions. This will need to be done manually:

"Sudo phpenmod mcrypt
sudo phpenmod mbstring "

Now restart the Apache program. This will apply the changes:

"Sudo systemctl restart apache2"

The phpMyAdmin interface can be accessed using ...:

"Https: // x / phpMyAdmin"

where "x" is the domain name or IP address of the server. Now you can easily enter the configured program. This is done using the default name "root" and the password that you entered when setting up MySQL. You will need the following steps to set up phpMyAdmin on Ubuntu if you want to be safer.

Security

With the help of additional techniques, you can provide "bonus" protection when managing the DBMS through a browser.

The .htaccess file must be used to ensure that the Apache server is controlled by the user. This file contains certain directives that are mandatory for the entire web server. It should be placed in the root directory. It can also be located anywhere else. Then the rules written in such .htaccess will have a higher priority, although they are valid for a specific location.

The directives available for .htaccess should be found on the official Apache web server site. Support for this type of file must be enabled in advance.

How do I enable permission to use?

Go to Apache config:

"Sudo nano /etc/apache2/conf-available/phpMyAdmin.conf"

Here you need to add the following data:

«
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
. . .»

Then close the file and save the changes. Restart Apache with a command like this:

"Sudo systemctl restart apache2".

Creating a file for directives

Enter the command:

"Sudo nano /usr/share/phpMyAdmin/.htaccess"

This will create a ".htaccess" file and get permission to edit it. The file must contain information. Enter the following information into it:

"AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/phpMyAdmin/.htpasswd
Require valid-user "

How do I create a password file?

Earlier, we suggested that you set the path for the password file. Now this file needs to be created and edited. The configured password will allow you to authenticate in phpMyAdmin from anywhere, and not only in Ubuntu.

Install the ".htpasswd" Utility Support Package.

"Sudo apt-get install apache2-utils"

Create a ".htpasswd" file and add a new user to it. It is better to do it like this:

"Sudo htpasswd -c /etc/phpMyAdmin/.htpasswd username"

where "username" is the username.

Rollback changes. How do I uninstall phpMyAdmin?

If you need to uninstall phpMyAdmin, Ubuntu lets you do the following:

Remove packages (only in reverse order):

Sudo apt-get purge phpMyAdmin
sudo apt-get purge php5-mysql
sudo apt-get purge php5
sudo apt-get purge mysql-server
sudo apt-get purge apache2 "

We remove dependencies:

"Sudo apt-get purge apache2.2-common
sudo apt-get purge apache2-mpm-prefork
sudo apt-get purge libapache2-mod-php5 "

If you are using Apache 2, you need to delete the directories:

"/ Etc / apache2 /
/ etc / php5 / apache2 / "

Conclusion

We've figured out how to install and uninstall phpMyAdmin, as well as other useful details. If you have any questions, feel free to leave them in the comments. Visitors and administrators of our site will help you find solutions to many problems!

This article explains how to install Apache web server, PHP, MySQL DBMS and phpMyAdmin on Ubuntu Linux.

Installing Apache

Install Apache 2 from the repositories. To do this, run the command:

Sudo apt-get install apache2

After installation, the Apache server usually starts immediately (the message "Starting web server apache2" is displayed on the screen).

To manage the Apache server, we can use the apache2ctl utility. For example, you can view the current status of the Apache server by running the command:

Apache2ctl status

The commands for stopping, starting and restarting the Apache server are as follows:

Sudo apache2ctl stop sudo apache2ctl start sudo apache2ctl restart

Apache server health check

You can check if Apache is working by typing http: // localhost in your browser. If everything is in order, a blank page will open with the text: "It works!" ...

Install PHP

To install PHP (version 5), run the command in the terminal:

Sudo apt-get install php5 libapache2-mod-php5

After that, you need to restart the Apache web server. Ubuntu did it for me automatically. If this does not happen, run the command:

Sudo apache2ctl restart

Installing MySQL

To install MySQL, run the following command:

Sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

After MySQL is installed, the following window should appear in which you need to enter the password. By default, MySQL creates an administrative user named root. In this window, you need to enter the password for this user and press Enter, then re-enter the password.

Install phpMyAdmin

phpMyAdmin is a dedicated web application for MySQL administration. It allows you to manage MySQL databases, execute SQL queries, view data, and much more directly from your browser. To install phpMyAdmin run the command:

Sudo apt-get install phpmyadmin

The phpMyAdmin installation will begin. At the end of the installation, a window will appear in which you need to select the apache2 server (press the Space key; an asterisk should appear opposite the line apache2) and press Enter.

Next, you will be prompted to create a database for phpMyAdmin. Select Yes and press Enter.

Then enter the password to register phpMyAdmin on the database server and confirm the password in the next window.

PhpMyAdmin health check

In your browser, type the address http: // localhost / phpmyadmin. This will open a form for entering the password and MySQL username to log into phpMyAdmin. Enter root for the username and the password that you specified for the root user when installing MySQL.

Conclusion

We have installed Apache web server, PHP language support, MySQL DBMS and phpMyAdmin application. The next step is to create virtual hosts (sites). Now (after installation) one virtual host has already been created, accessible at http: // localhost. The files for the localhost virtual host are located in the / var / www directory. In one of the following posts, I will show you how to create virtual hosts for the Apache web server.

Is a LAMP application built specifically for administration MySQL servers. Written in PHP and accessible via a web browser, phpMyAdmin provides a graphical interface for database administration tasks.

Installation

Before installing phpMyAdmin, you need access to the MySQL database on the same computer where you install phpMyAdmin, or on a remote computer accessible over the network. See the section for details. To install in the terminal enter:

Sudo apt-get install phpmyadmin

When prompted, select which web server will be configured for phpMyAdmin. This section assumes use as a web server Apache2.

In your browser, go to http: // servername replacing servername to the actual server address. On the login page enter root as a username, or another user if you configured one, as well as the password for this MySQL user.

Customization

The phpMyAdmin configuration files are located in / etc / phpmyadmin. The main configuration file is /etc/phpmyadmin/config.inc.php. This file contains configuration options that apply to phpMyAdmin globally.

To use phpMyAdmin to manage MySQL on a different server, configure the following entry in /etc/phpmyadmin/config.inc.php:

$ cfg ["Servers"] [$ i] ["host"] = "db_server";

Replace db_server to the current IP address of the remote database server. Also make sure that the phpMyAdmin machine has permission to access the remote database.

Once configured, log out of phpMyAdmin and log in again and you will be able to access the new server.

The config.header.inc.php and config.footer.inc.php files are used to add HTML top and bottom headers for phpMyAdmin.