What to install for mysql?

I am going to learn mysql by myself, so I would like to install mysql on . But there are many applications related to mysql in synaptics. I was wondering what are some basic applications to be installed?

Consider these two cases: mysql for webserver use, or mysql not for webserver use. Will the packages to be installed for the two cases be different?

Thanks and regards!


Solution 1:

The packages for the usages of MySQL will not vary at all. For a basic MySQL server (and client program so you can use the server), you will run the following:
sudo apt-get install mysql-server mysql-client

That will install both the server and the client program, as well as any dependencies that those programs require. The client program will allow you to interface with the database server. You may install the server without mysql-client, if you are going to not use the mysql command via the server's terminal (such as with a remote mysql client, or using the mysql command in a terminal from another computer).

NOTE: This stuff was originally in comments on @mbx's answer, but this is actually an answer, not a comment :P

Solution 2:

I'd recommend phpmyadmin running on apache. You can quite easily look at the content of your tables. SQL execution is also supported. For PosgreSQL there is pgadmin as standalone tool, MySQL Workbench seems to be a similar one.

If your server is public (even if not), you should change the default passwords.

I commonly use apt-get for installing packages, so

sudo apt-get install mysql-server mysql-client

should do the job, depending on your specific flavour of distribution. For a server only installation, you can even omit the mysql-client if you want to save some bytes. It is used to connect to your dbms from the command shell, so if you might need it once you can still do a lazy installation...

Solution 3:

Consider reading this if you want to setup a LAMP on Ubuntu. You can also go to W3Schools for more learning material on SQL and others.