[DA v.1.645] mysql and mail binary are missing on clean install (Debian 11)

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
659
Location
The Earth
I'm using the following build:

Code:
DirectAdmin v.1.645 5a7a41a6b7dd7b790563387a07a065fdb0054488

After DA has finished installed, then when I run mysql command it said:

root@sun:~# mysql
-bash: mysql: command not found

But mysqld is running without error:

root@sun:~# systemctl status mysqld
● mysqld.service - MySQL database server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-11-24 02:59:01 +08; 1h 41min ago
Main PID: 114886 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 8 (limit: 4672)
Memory: 45.6M
CPU: 622ms
CGroup: /system.slice/mysqld.service
└─114886 /usr/local/mysql/bin/mysqld --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock

Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] InnoDB: 10.6.11 started; log sequence numb>
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] Plugin 'FEEDBACK' is disabled.
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] InnoDB: Loading buffer pool(s) from /var/l>
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] Server socket created on IP: '0.0.0.0'.
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] Server socket created on IP: '::'.
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] InnoDB: Buffer pool(s) load completed at 2>
Nov 24 02:59:01 **.com mysqld[114886]: 2022-11-24 2:59:01 0 [Note] /usr/local/mysql/bin/mysqld: ready for con>
Nov 24 02:59:01 **.com mysqld[114886]: Version: '10.6.11-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: >
Nov 24 02:59:01 **.com systemd[1]: Started MySQL database server.
I have to do this as workaround as I'm using mariadb (I'm not sure if this is correct to create symlink here). The previous DA installation did not have this issue.
ln -s /usr/local/bin/mariadb /usr/local/bin/mysql
In addition to the above, the binary mail is also missing as I run the command mail, it complains that the command is missing too.


In conclusion, using the new installer there are 2 binaries are missing:

1) mysql
2) mail

@fln can you inspect this? I have made 3 times clean installations for Debian 11. Should I manually install mailx or mailutils? I remember doing a manual install will break mysql backup as I had mentioned before here:

 
Last edited:
Thanks for creating a new thread, lets move the discussion from release thread to here.

  • Regarding mysql this is a bug in CB, we will be releasing a hot-fix for it soon.
  • For mail this needs a longer discussion
On RHEL based systems (CentOS 7, Almalinux/Rockylinux 8, Almalinux/Rockylinux 9) fresh DA install will have /usr/bin/mail available because it is provided by the RHEL s-nail package.

On Debian based systems, after a fresh install /usr/bin/mail is provided by mailutils package. We are not installing it explicitly but it usually gets pulled by the logrotate package as recommended dependency.

If Debian system does not have /usr/bin/mail we do install s-nail package (for internal DA use) and use it instead of /usr/bin/mail. However on Debian systems s-nail package does not create /usr/bin/mail and needs to be used explicitly by the s-nail command. For DA this does not cause any issues since we prefer mail but fall-back to s-nail if it is not available. For your custom scripts you should take care to manually install mailutils or bsd-mailx if it is not present on the system. You can also opt to use s-nail but it will not automatically be registered as mail alternative.
 
For your custom scripts you should take care to manually install mailutils or bsd-mailx if it is not present on the system. You can also opt to use s-nail but it will not automatically be registered as mail alternative.

Thanks @fln your reply is very helpful. Now I will use either mailutils or bsd-mailx and see if it breaks the Admin backup like I previously experienced in my post above.
 
Back
Top