Installing MySQL
Much like how we installed PHP and Lighttpd, do:
It is going to download ~33MB of data so be patient as apt-get works its magic. You are going to want to setup a root password as well. After it is complete, you should see something similar to:
Note that if you were never prompted to set your mysql password you can use the command (if you have set the password, skip this set):
Code:
# sudo mysqladmin -u root password "YourPasswordGoesHere"
To check your mysql server, type (# mysql -u root -p):
If you get something like the image above, it works. \q will exit mysql. Now we will make a new database called trial:
To make sure the database was created we can try to delete it:
So we are able to create and delete databases! Yay. Now lets install phpmyadmin so we can easily manage our databases. Type:
Code:
# apt-get install phpmyadmin
You will get a screen like below, just go to OK, do not check any boxes:
Once it is done installing, we will need to move it to /var/www:
Now restart lighttpd (the commands are above), and in your browser try to go to http://localhost/phpmyadmin The output should look similar to the one below:
Wow, we have accomplished a lot so far. MySQL, PHP, and Lighttpd all working with phpmyadmin to manage databases. Whats left? Well, nothing really, However if you want to install cacti (server status and statistics) follow the steps below.
Bookmarks