I was wondering what the difference is between mysql-server and mysql-client and came upon this stackoverflow post explaining the difference. I was curious if installing mysql-server also included mysql-client. So, after creating a fresh AWS Ubuntu instance, I ran which which mysqld
and which mysql
to confirm nothing came preinstalled with the AWS instance, and sure enough both commands returned nothing. However, after running sudo apt install mysql-server
, when I ran which mysql
and which mysqld
they both returned something: which mysqld
returned /usr/sbin/mysqld and which myself
returned /usr/bin/mysql, suggesting that my installation of mysql-server installed both the client and the server. Is that accurate? As I mentioned, the stack overflow post I visited earliear indicated they were distinct pieces of software, so I'm wondering why installing mysql-server would install the client as well?
They are separate pieces of software, but installing mysql-server
installs mysql-client
as well, because you can use mysql-client
to connect to the server, even over localhost. If you look at the package listing for mysql-server, you will see it depends on mysql-server-8.0, which depends on mysql-client-8.0, causing apt
to install the client as well.
sudo apt install -s mysql-server
– KGIII Jan 17 at 2:55mysql
andmysqld
. I am not sure why mysql-server installs the client part as well but it looks logical: how can you use the server without at least one client? – Marc Vanhoomissen Jan 18 at 7:47