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!


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

| improve this answer | |
  • Thanks! I have installed php5-mysql before. Will installing mysql-server mysql-client install the same thing? – Tim Jul 21 '11 at 2:07
  • No, php5-mysql is the PHP module/plugin that allows for PHP scripts and files to communicate with MySQL servers, but does not provide the servers themselves. The mysql-server package actually installs the MySQL Daemon (server), which processes database commands. The PHP plugin/module packages are managed separately from the server/client packages, and will not be affected by the installation of the mysql-server or mysql-client packages. – Thomas Ward Jul 21 '11 at 2:09
  • (1) Besides MYSQL, do all database management systems use the server-client model? (2) Are query languages used only on the client side of database management systems? – Tim Jul 21 '11 at 2:39
  • (1) Most follow that model. (2) I am not entitled to answer that question, as I am not a certified database administrator. Others here on askubuntu may be able to answer that question, but in my own opinion, that should be asked on superuser.stackexchange.com if you are truly interested in the answer. – Thomas Ward Jul 21 '11 at 2:44
  • @Tim (1) Access is a popular example fornot using that kind of model, as you usually connect to the .mdb file itself. You can thus deploy the database as a file without the (Server-)Application (Access). This is quite commonly used in consumer software, notably MediaMonkey and StudioLine3. (2) You can define Trigger in SQL which runs on the server (eg. update trigger for every insert). It does not to be stored als SQL though, but if you order a backup script it will be in SQL. – mbx Jul 22 '11 at 19:10

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...

| improve this answer | |
  • Thanks! If not for webserver use, will there be a smaller way to install mysql? – Tim Jul 21 '11 at 0:10
  • @The Evil Phoenix: Thanks! What is mysql-client for? I.e., in what cases do I need it? – Tim Jul 21 '11 at 1:15
  • @Tim: please read my answer to your question, as I did theoretically answer your question correctly, I moved my comments into an answer. – Thomas Ward Jul 21 '11 at 1:53

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.