1. Use apt-ge to install phpmyadmin
1. Open the terminal and enter the command:
sudo apt-get install phpmyadmin
[Note]: The above command may appear If the lock cannot be obtained, if so, use the following command:
sudo rm /var/cache/apt/archives/locksudo rm /var/lib/dpkg/lock
and then execute:
sudo apt-get install phpmyadmin
2. Due to network problems during installation, ## may occur
#You can follow the prompts and try again. 3. The window prompts to select the serverSelect apache2 and press Enter##4. Set the password for phpMyAdmin
5. Enter the phpMyAdmin password again to confirm
6. Install the necessary dependency packages, because php7 does not come with it by default
php- mbstring, php-gettext
These two packagesYou can also look for these two in the directory installed above. If not, execute:
$ sudo apt-get install php-mbstring$ sudo apt-get install php-gettext
Select automatically configure the database during installation and enter the password of the database root account.
If you do not install the above two php software packages, an error or a white screen will be reported, indicating that /usr/share/php/php-gettext/gettext.inc cannot be found.
7. Establish a soft connection under /var/www/html
$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
2. Modify the PHP configuration file
[Note]: php.ini file path, if you don’t know, you can check it in the file , Screenshot:
Find
etc/php/7.2/apache2/php.ini (use your own path for the path)<pre class="brush:php;toolbar:false">$ sudo gedit /etc/php/7.2/apache2/php.ini</pre>
Search
and find the second display_errors = On
Add one:
(Turn on mbstring)
3. Restart apache
$ sudo /etc/init.d/apache2 restart
4. Log in to phpMyAdmin
Access port localhost/phpmyadmin, enter the account password
Recommended related articles and tutorials:
phpmyadmin tutorialThe above is the detailed content of How to download and install phpmyadmin in ubuntu. For more information, please follow other related articles on the PHP Chinese website!