| > Maybe you can give some examples of administration that require you to? That require you to what? Nothing in MySQL inherently requires sudo or involves "hooking into sudo". The mysql server daemon (mysqld) typically runs as mysql:mysql, with directories owned by mysql:mysql in the Unix permission model, but this is all entirely dependent on how you have installed it. Inside the database server, you can freely configure database users, which are entirely separate from the notion of OS users. Although the default superuser in MySQL is typically called "root", it can be called anything, and is not tied to the OS root user. Connecting to MySQL can be done either via tcp/ip or locally through a Unix domain socket; this is all completely configurable on a per-database-user level inside the database itself. When connecting over the local Unix domain socket, connections are permitted if the requested user name has a database user entry with @localhost for the host portion. I suppose your OS user is relevant in two ways when using the local Unix domain socket: * You need OS permissions to interact with the socket. That's the case with any Unix domain socket, not MySQL specific. * If you're using the standard `mysql` command-line client and you haven't supplied a database user name for the connection, your OS user name will be used as a default. So perhaps you were running `sudo mysql ...` to connect to the local mysqld because your OS user lacked the :mysql group to interact with the socket; or because your OS user did not have a corresponding database user/grants inside the database. In the latter case, you can just type `mysql -u root ...` instead to specify what database user to connect as. There's literally nothing requiring sudo in that case. That said, you can optionally make this passwordless using the auth_socket auth plugin, in which case there are extra considerations around having the users match and maybe that's what happened to you. But there's no requirement to use that passwordless auth_socket approach for administration. > Collations and charsets and the DB engine and other stuff wasn't particularly good either, That's quite vague and it sounds like you aren't well-informed about MySQL in general so I suppose there's little sense in diving into it. > I don't think it matters. 8 is what, a decade old or so? MySQL 8.0 came out less than seven years ago, but that's irrelevant since everything I described above regarding permissions is equally true in MySQL 8.0. |
What's your experience with Postgres?