The MySQL database device is the preferred, open-source, relational database. Many other initiatives, together with WordPress, are backed with the aid of a MySQL database and rely on its intensive function checklist and simple setup. For learners, or those which can be lazy, there’s the phpMyAdmin instrument to lend a hand us with the maintenance and interface of MySQL. Accessed out of your internet browser, phpMyAdmin is a PHP-based frontend control panel that allows you to simply manage your MySQL databases and users, evaluation SQL task, import and export database backups, run searches, and extra. on this guide, well duvet the advisable strategy to set up phpMyAdmin from the Ubuntu packages, and the right way to stable phpMyAdmin. Well also go over putting in phpMyAdmin from source, even if this isn’t really helpful in a manufacturing environment. requirements for putting in phpMyAdmin on Ubuntu before putting in phpMyAdmin, we need to meet some normal requirements: A LAMP stack (Linux, Apache, MySQL, and PHP) installed PHP 5.2.zero or more moderen 1 2 three 4 5 $ php -v PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:eleven) Copyright (c) 1997-2014 The PHP group Zend Engine v2.5.zero, Copyright (c) 1998-2014 Zend applied sciences with Zend OPcache v7.zero.3, Copyright (c) 1999-2014, through Zend technologies The PHP mysql or mysqli extensions 1 2 three grep mysql mysql mysqli MySQL 5.0.1 or newer 1 2 3 four $ mysql -v Welcome to the MySQL display. instructions finish with ; or g. Your MySQL connection identity is 39 Server model: 5.5.41-0ubuntu0.14.04.1-log (Ubuntu) install phpMyAdmin from Ubuntu programs The default Ubuntu repositories keep up-to-date with the newest secure releases of phpMyAdmin, and this is the beneficial set up process for a manufacturing setting. Step 1: replace package Index First, we want to make sure that our native server is pulling the latest updates. 1 sudo apt-get update Step 2: install phpMyAdmin bundle Now we will set up the latest version of phpMyAdmin. 1 sudo apt-get set up -y phpmyadmin Step three: Configure phpMyAdmin package After installing phpMyAdmin, you’ll be presented with the package deal configuration monitor. Press the distance bar to position an * beside apache2. Press TAB to highlight adequate, then hit ENTER. choose apache2 and hit ok. The set up course of will continue unless youre again at another package configuration screen. make a selection sure and then hit ENTER at the dbconfig-in style screen: make a choice yes and hit ENTER. you’ll be caused for your database administrators password. sort it in, hit TAB to highlight ok, and then press ENTER. Enter your DB administrators password. subsequent, enter a password for the phpMyAdmin utility itself. Enter the password youd like to make use of to get right of entry to the phpMyAdmin interface. verify the phpMyAdmin utility password. confirm your phpMyAdmin password. After the set up process completes, it adds the phpMyAdin configuration file right here: /and so forth/apache2/conf-enabled/phpmyadmin.conf permit PHP mcrypt Module test if the PHP mcrypt module is already in use: 1 php -m in case you dont get any outcomes, install the PHP mcrypt module with: 1 sudo php5enmod mcrypt Now when we take a look at, you should grep mcrypt mcrypt Restart Apache Now we must restart the Apache internet server for changes to take impact: 1 sudo carrier apache2 restart get admission to phpMyAdmin for the first Time Now that you would be able to log in to phpMyAdmin by using going to your server adopted by way of /phpmyadmin. which you could just use http://YOUR_SERVER_IP/phpmyadmin if you dont have domains arrange but. Log in with the foundation user and the password you place for the phpMyAdmin utility. Log in to phpMyAdmin as the basis user. Now youll see the phpMyAdmin dashboard. You must now see the phpMyAdmin dashboard. secure and Lock Down phpMyAdmin Interface Naturally, as a result of phpMyAdmin is such a widespread utility installed on many net servers, it’s a well-liked target for unauthorized get admission to attempts. we can simply secure our phpMyAdmin set up by the use of Apaches built-in .htaccess authentication. Step 1: Edit phpMyAdmins Apache Config We need to edit the phpMyAdmin Apache config that was created previous: 1 sudo vi /etc/apache2/conf-to be had/phpmyadmin.conf Add AllowOverride ALL directive below the DirectoryIndex: 1 2 3 4 5 choices FollowSymLinks DirectoryIndex index.php AllowOverride ALL … Step 2: Restart Apache to just accept Config changes Restart Apache so our adjustments take have an effect on: 1 sudo provider apache2 restart Step 3: Create an .htaccess File Now that weve enabled overrides for our phpMyAdmin application from Apache, we wish to in truth create an override with an .htaccess file. 1 sudo vi /usr/share/phpmyadmin/.htaccess Add this text: 1 2 3 4 AuthType basic AuthName “phpMyAdmin users best” AuthUserFile /and many others/phpmyadmin/.htpasswd Require legitimate-person Step four: Create an .htpasswd File for Authentication First we’d like the htpasswd utility. for those who dont have already got this installed, use the following: 1 sudo apt-get install apache2-utils Now we can create a secure consumer for our phpMyAdmin application with the command: 1 2 three 4 $ sudo htpasswd -c /and many others/phpmyadmin/.htpasswd phpmyadmin New password: Re-type new password: adding password for user phpmyadmin If for some reason you needed to give others get admission to to the phpMyAdmin login screen however didnt want them using your .htaccess credentials, you could create additional steady users with: 1 sudo htpasswd /and so forth/phpmyadmin/.htpasswd anotheruser Now in the event you attempt to access the phpMyAdmin login, youll get the .htaccess password advised first. You must now see the .htaccess password instructed we created set up phpMyAdmin from source while its now not really helpful for manufacturing servers, because it’s a must to manually be sure your install of phpMyAdmin is saved up-to-date, that you could additionally set up phpMyAdmin from source. Step 1: establish Apaches DocumentRoot We need to find Apaches DocumentRoot so we know the place to place our phpMyAdmin files: 1 2 $ grep DocumentRoot /and many others/apache2/websites-available/000-default.conf DocumentRoot /var/www/html on this case, well want to put the phpMyAdmin recordsdata in /var/www/html. Step 2: obtain latest version of phpMyAdmin The steady model of phpMyAdmin on the time this article was written: phpMyAdmin four.three.eleven.1 (launched three/4/2015). talk over with the phpMyAdmin download page to clutch the latest model of phpMyAdmin. i stopped up with a phpMyAdmin-four.3.11.1-english.tar.gz file in my /var/www/html listing. 1 2 3 $ cd /var/www/html $ ls index.html phpMyAdmin-4.3.eleven.1-english.tar.gz Step 3: Unpack phpMyAdmin files 1 sudo tar xvzf phpMyAdmin-four.three.eleven.1-english.tar.gz Now rename the phpMyAdmin-4.three.11.1-english directory: 1 sudo mv phpMyAdmin-18.104.22.168-english phpmyadmin put off the phpMyAdmin recordsdata: 1 sudo rm phpMyAdmin-22.214.171.124-english.tar.gz Step four: secure /phpmyadmin directory We wish to set up a selected consumer for our phpMyAdmin install. 1 2 three 4 5 6 7 8 9 10 $ sudo adduser phpmyadmin including person `phpmyadmin’ … adding new group `phpmyadmin’ (1001) … adding new person `phpmyadmin’ (1001) with team `phpmyadmin’ … growing home listing `/home/phpmyadmin’ … Copying information from `/and many others/skel’ … Enter new UNIX password: Retype new UNIX password: passwd: password updated efficiently 1 sudo chown -R phpmyadmin.phpmyadmin /var/www/html/phpmyadmin Step 5: replace phpMyAdmin config.inc With set up Wizard to make use of the phpMyAdmin install wizard, we first want to set up the config.inc file. 1 2 three 4 5 cd /var/www/html/phpmyadmin sudo mkdir config sudo chmod o+rw config sudo cp config.sample.inc.php config/config.inc.php sudo chmod o+w config/config.inc.php Step 6: Run phpMyAdmin set up Wizard to start the set up of phpMyAdmin, get admission to the set up URL at: http://example.com/phpmyadmin/setup/index.php beneath the Servers part, click on New Server. below the Servers section, click on New Server. underneath the Authentication tab, type to your MySQL root password within the Password for Config Auth field after which click observe. within the Password for Config Auth field, sort to your MySQL root password. cast off the phpMyAdmin /config listing for safety. 1 sudo rm -rf /var/www/html/phpmyadmin/config final thoughts on phpMyAdmin Now that youve successfully put in phpMyAdmin on Ubuntu, you could start taking part in round with some of its more developed features. One factor we counsel looking at is the standing tab, for you to display any current MySQL queries which can be running on the server, as well as server uptime and the collection of connections to the MySQL server. investigate cross-check the respectable phpMyadmin documentation for more the usage of phpMyAdmin.