Game Development Reference
In-Depth Information
Installing a database
When we think of a database on a Linux machine, the first thing that often comes to
our mind is MySQL. It is the first choice because it is free, open source, and reliable,
and comes with a rich tool set. However, you have to remember that the Pi is not a
server, and you might just want to use SQLite instead.
According to Wikipedia, as of July 2013, MySQL is the world's second most widely
used open-source relational database management system.
Installing MySQL
The most popular tool to manage MySQL is phpMyAdmin . We will install these two
and then test the installation. This can take up to 15 minutes.
sudo apt-get update
sudo apt-get install mysql-server
You will be presented with blue-background screens asking you for the root
user password. You should write these down or store them in an application
like KeePass .
The MySQL root user must never be used by web applications, especially production
ones available on the Internet. The phpMyAdmin application needs to run with root
settings so that it can fully manage MySQL. The best practice for phpMyAdmin is
to only allow local network connections. This is because it will be used to create
or delete databases, users, and passwords and apply a permission access to
those databases.
sudo apt-get install phpMyAdmin
PhpMyAdmin is a complex web application that uses many files and PHP libraries to
allow you to manage MySQL and the databases found within.
During installation, you get another blue screen asking for the web server that
should be automatically configured. Regrettably, nginx is not on the list, so click on
OK . After a short while, a final screen will ask about dbconfig-commin ; click on NO .
We need to manually configure phpMyAdmin just like any other website for nginx.
PhpMyAdmin places its files in the shared location /usr/share/phpmyadmin , and
anyone with access to the system and the username and password can use this
shared site to access only their database.
 
Search WWH ::




Custom Search