{"id":1537,"date":"2016-04-06T16:41:53","date_gmt":"2016-04-06T23:41:53","guid":{"rendered":"http:\/\/internetofhomethings.com\/homethings\/?p=1537"},"modified":"2016-04-29T15:06:11","modified_gmt":"2016-04-29T22:06:11","slug":"usb-lamp-web-server-part-4-phpmyadmin-for-mysql-administration","status":"publish","type":"post","link":"https:\/\/internetofhomethings.com\/homethings\/?p=1537","title":{"rendered":"USB LAMP Web Server Part 4 &#8211;  phpMyAdmin for mySQL Administration"},"content":{"rendered":"<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin.png\" rel=\"attachment wp-att-1539\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1539\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin.png\" alt=\"phpmyadmin\" width=\"342\" height=\"242\" \/><\/a><\/p>\n<p>My\u00a0last post\u00a0completed the USB LAMP web server.\u00a0And at this point, the server already has the powerful essential foundation. Here is what we have so far.<\/p>\n<ul>\n<li><a href=\"http:\/\/wp.me\/p5NRQ8-n3\" target=\"_blank\">Part 1 &#8211; Setting up the Linux Apache Server<\/a><\/li>\n<li><a href=\"http:\/\/wp.me\/p5NRQ8-nB\" target=\"_blank\">Part 2 &#8211; Adding php to your Web Server<\/a><\/li>\n<li><a href=\"http:\/\/wp.me\/p5NRQ8-om\" target=\"_blank\">Part 3 &#8211; Completing the LAMP with mySQL<\/a><\/li>\n<\/ul>\n<p>But there is still a need for at least one additional tool to fully utilize the mySQL server. The basic functions of creating and deleting databases, creating tables and stored procedure, and importing and exporting data and SQL require an admin tool.<\/p>\n<p>And while there are some third-party tools available to externally support database administration (my favorite is mySQL Workbench), there is still a need for an embedded tool accessible on the server computer.<\/p>\n<p>So here we go\u00a0the installation of one of the most common mySQL administration tools on the USB LAMP server, phpMyAdmin.<\/p>\n<p>And, just like with my last post, for those who do not want to go through all the setup steps, a Linux session save file is included with this post.<\/p>\n<p>Simply replace your existing save file with this one and you will be 99% complete with a web server that supports both php and mySQL server. <a href=\"https:\/\/www.dropbox.com\/s\/g4tfjpt31x9vot2\/precisesave-lampserver.zip?dl=0\" target=\"_blank\">Here it is<\/a>. You can also refer to my\u00a0<a href=\"http:\/\/internetofhomethings.com\/homethings\/?p=1510#quickandeasy\">Quick and Easy<\/a> section from the previous\u00a0post on this series for minimal installation steps.<\/p>\n<p>But if\u00a0you would like to understand the steps to installing phpMyAdmin on the USB Precision Puppy Linux setup, read on.<\/p>\n<h3 style=\"text-align: center;\"><strong>Adding phpMyAdmin\u00a0to the USB Web\u00a0Server<\/strong><\/h3>\n<p>Start the USB installed Precision Puppy Linux from <a href=\"http:\/\/wp.me\/p5NRQ8-om\" target=\"_blank\">part 3<\/a>. Then launch the Puppy Package Manager. In the search window (Find), enter &#8220;phpMyAdmin&#8221; and search all repositories.<\/p>\n<p>Select phpmyadmin_3.4.10.1-1.<\/p>\n<p>Then click &#8220;Examine dependencies&#8221; \u00a0 and &#8220;Download and install selected packages&#8221;.<\/p>\n<p>And as with other packages, there are a few post-installation steps required. After the installation has completed, open a console windows and enter:<\/p>\n<p># ln -s \/etc\/phpmyadmin\/apache.conf \/etc\/apache2\/conf.d\/phpmyadmin<br \/>\n# ln -s \/etc\/apache2\/mods-available\/mime* \/etc\/apache2\/mods-enabled\/<\/p>\n<p>Now, to enable initial access to phpMyAdmin, passwordless logins need to be enabled. This is easy. Just open the file:<\/p>\n<p>\/etc\/phpmyadmin\/config.inc.php<\/p>\n<p>Un-comment the line:<\/p>\n<p>\/\/$cfg[&#8216;Servers&#8217;][$i][&#8216;AllowNoPawwords&#8217;] = TRUE;<\/p>\n<h3 style=\"text-align: center;\"><strong>Testing phpMyAdmin<\/strong><\/h3>\n<p>In order to access phpMyAdmin, the mySQL server must be running. And to start mySQL, you must know the IP of the computer hosting the server. This should already be known from installing parts 1-3. This is the same IP that should be in the host file.<\/p>\n<p>A quick refresher&#8230;<\/p>\n<p><strong>Identify\u00a0the IP :<\/strong><\/p>\n<p>From a console, enter:<\/p>\n<p># \/sbin\/ifconfig eth0<\/p>\n<p>The computer will respond with several lines. The second line should contain the ip. My second line began with:<\/p>\n<p>inet addr:192.168.0.11<\/p>\n<p><strong>The host file:<\/strong> \/etc\/host<\/p>\n<p>Now lets start the mySQL and apache servers and test the phpMyAdmin installation:<\/p>\n<p><strong>Start the mySQL Server:<\/strong><\/p>\n<p>From a console, enter:<\/p>\n<p># mysqld &#8211;bind-address 192.168.0.11<\/p>\n<p><strong>Start Apache Server:<\/strong><\/p>\n<p>From a second console, enter:<\/p>\n<p># \/etc\/init.d\/apache2 restart<\/p>\n<p>Now go to another computer on your network and enter the following URL from a browser to start phpMyAdmin:<\/p>\n<p>http:\/\/192.168.0.11:9777\/phpmyadmin<\/p>\n<p>The following initial screen should appear:<\/p>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin.jpg\" rel=\"attachment wp-att-1551\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1551\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin.jpg\" alt=\"phpmyadmin\" width=\"576\" height=\"743\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin.jpg 576w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-233x300.jpg 233w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/a><\/p>\n<p>Use the Username &#8220;root&#8221; with no password and enter &#8220;Go&#8221; to begin the phpMyAdmin session.<\/p>\n<p>The opening screen will look similar to this:<\/p>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened.jpg\" rel=\"attachment wp-att-1552\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1552\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened.jpg\" alt=\"phpmyadmin-opened\" width=\"1147\" height=\"820\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened.jpg 1147w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened-300x214.jpg 300w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened-768x549.jpg 768w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-opened-1024x732.jpg 1024w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Configuring\u00a0phpMyAdmin<\/strong><\/p>\n<p>If you wish to add more users with password logins,\u00a0click on the &#8220;Privileges&#8221; tab at the top of the phpMyAdmin screen. You will see a link to &#8220;Add a new User&#8221;.<\/p>\n<p><a href=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser.jpg\" rel=\"attachment wp-att-1555\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1555\" src=\"http:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser.jpg\" alt=\"phpmyadmin-adduser\" width=\"1127\" height=\"820\" srcset=\"https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser.jpg 1127w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser-300x218.jpg 300w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser-768x559.jpg 768w, https:\/\/internetofhomethings.com\/homethings\/wp-content\/uploads\/2016\/04\/phpmyadmin-adduser-1024x745.jpg 1024w\" sizes=\"auto, (max-width: 1127px) 100vw, 1127px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">After creating a new user, remember to set the user privileges (Use &#8220;edit Privileges&#8221; link) so that the user can gain access to selected databases and functions.<\/p>\n<p style=\"text-align: left;\">There is plenty of information available on-line on how to configure the phpMyAdmin utility. Just look for it.<\/p>\n<p style=\"text-align: center;\"><strong>phpMyAdmin Limitations<\/strong><\/p>\n<p style=\"text-align: left;\">Note that this version of phpMyAdmin is 3.4.10. After using version 4.0.7 for a significant period of time, this older version lacks some of the features I had become used to being available.\u00a0In fact, the only purpose to use this version of phpMyAdmin is to add and delete users, create databases, and import tables and procedures.<\/p>\n<p style=\"text-align: left;\">Essential functions, but you will need more&#8230;<\/p>\n<p style=\"text-align: left;\">\u00a0Still,\u00a0I have found that even though the version of phpMyAdmin that is available with Precision Puppy is somewhat dated, it is sufficient for basic database administration. However, it is recommended once your database and users are initially setup with phpMyAdmin, subsequent table generation and stored procedure development use a third party tool. As noted earlier in this post, my favorite is the open-source <a href=\"http:\/\/dev.mysql.com\/downloads\/workbench\/\" target=\"_blank\">MySQL Workbench<\/a>.<\/p>\n<p style=\"text-align: center;\"><strong>In Closing<\/strong><\/p>\n<p style=\"text-align: left;\">This series should provide\u00a0\u00a0a great reference for anyone setting up a web server, either now or in the future. The server provides an excellent platform for\u00a0several uses, including system development and test, learning about server configuration and capabilities, and even for deployment of a permanent installation.<\/p>\n<p style=\"text-align: left;\">There is\u00a0just one more addition planned for the USB LAMP server&#8230;<\/p>\n<p style=\"text-align: left;\">The addition of the popular WordPress content management system (CMS). Stay tuned for that post coming soon.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My\u00a0last post\u00a0completed the USB LAMP web server.\u00a0And at this point, the server already has the powerful essential foundation. Here is what we have so far. Part 1 &#8211; Setting up &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,19,3],"tags":[129,128],"class_list":["post-1537","post","type-post","status-publish","format-standard","hentry","category-alltheposts","category-internet-of-things","category-web-coding-tips","tag-phpmyadmin","tag-phpmyadmin-for-puppy-linux"],"_links":{"self":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/1537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1537"}],"version-history":[{"count":18,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/1537\/revisions"}],"predecessor-version":[{"id":1605,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=\/wp\/v2\/posts\/1537\/revisions\/1605"}],"wp:attachment":[{"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/internetofhomethings.com\/homethings\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}