MySQL – Install LAMP Server for MySQL Labs (tasksel)

This class will show you how to build a lab for the further MySQL classes. You will use the tasksel app to install the LAMP Stack (Linux, Apache MySQL, PHP) on Ubuntu Desktop 18.04.

Note: Some people may disagree with building a LAMP server with tasksel, but for a testing lab it is the easiest most reliable way to get a functional LAMP box.

  • Start with a fresh install of Ubuntu Desktop (The GUI one)
    • Make sure to give 4GB of RAM to the virtual machine
  • update – Update the OS
  • sudo apt-get install tasksel – Go to terminal and install tasksel
  • sudo tasksel – Run tasksel
    • Select LAMP -> Tab to OK and hit Enter
  • sudo mysql – Starts MySQL and logs you in as root
  • show databases; – shows default databases
    • DON’T FORGET THE SEMI COLON!!!
  • use mysql; – Enter mysql database
  • show tables; – Shows tables in mysql database
  • desc user; – Shows columns in user table
  • select user from user; – Lists user field from records in user table
  • exit – Exits mysql

1 Comment

  1. If you are using Linux Mint, avoid installing the Lamp Server with tasksel. Following these instructions would not let me log into mysql (repeated access denied on the root account), and removing the lamp server via sudo tasksel remove lamp-server also removed the cinnamon desktop environment and disabled my workstation’s audio.

Leave a Reply