12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Install phpMyAdmin on LAMP (Linux Apache MySQL PHP)</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Linux,PHP,MySQL,Web Based Tools,Web Based Administration,Database Administration,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Install phpMyAdmin on LAMP (Linux Apache MySQL PHP)">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="revised" content="05/23/2022 08:51:11 PM" />
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Install phpMyAdmin on LAMP (Linux Apache MySQL PHP)</h1>
- </div>
- <div></div>
- <div id="content">
- <h2>What is phpMyAdmin?</h2>
- <blockquote><em>phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. -<a href="https://www.phpmyadmin.net" target="_blank">https://www.phpmyadmin.net</a></em></blockquote>
- <p>This tutorial assumes a working Apache2, PHP and MySQL/MariaDB environment is already installed</p>
- <ol>
- <li>Log into the Linux machine</li>
- <li>Run the following commands in terminal to install phpMyAdmin:
- <div class="codeBlock"># update apt repositories<br />
- sudo apt update<br />
- sudo apt upgrade<br />
- # download latest phpMyAdmin<br />
- wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz<br />
- # create phpmyadmin directory in web root<br />
- sudo mkdir /var/www/html/phpmyadmin<br />
- # extract the downloaded phpMyAdmin to the folder created<br />
- sudo tar xvf phpMyAdmin-latest-english.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin<br />
- # create a copy of the sample config file<br />
- <span style="display: none;"> </span><span style="display: none;"> </span><span style="display: none;"> </span><span style="display: none;"> </span>sudo cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php<br />
- <span style="display: none;"> </span><span style="display: none;"> </span># set folder owner<br />
- <span style="display: none;"> </span><span style="display: none;"> </span>sudo chown www-data:www-data /var/www/html/phpmyadmin<br />
- # restart apache service<br />
- sudo systemctl restart apache2<br />
- # connect to MySQL and create a user to use with phpMyAdmin<br />
- sudo su<br />
- mysql -u root<br />
- <span style="display: none;"> </span>CREATE USER 'i12bretro'@'localhost' IDENTIFIED BY 'some_very_complex_password';<br />
- GRANT ALL PRIVILEGES ON * . * TO 'i12bretro'@'localhost';<br />
- FLUSH PRIVILEGES;</div>
- </li>
- <li>Once the installation completes, open a web browser and navigate to http://DNSorIP/phpmyadmin</li>
- <li>Log in using the user created in the steps above</li>
- <li>Enjoy visual browser based control over MySQL/MariaDB</li>
- </ol>
- </div>
- </div>
- </body>
- </html>
-
|