Description:
Document describes,
> When you deploy sandboxes, MySQL Shell searches for the mysqld binary which it then uses to create the sandbox instance. You can configure where MySQL Shell searches for the mysqld binary by configuring the PATH environment variable. This can be useful to test a new version of MySQL locally before deploying it to production. For example, to use a mysqld binary at the path /home/user/mysql-latest/bin/mysqld issue:
> PATH=/home/user/mysql-latest/bin/mysqld:$PATH
But actually, MySQL Shell searches "Under in $PATH directories", example should be
> PATH=/home/user/mysql-latest/bin:$PATH
MySQL :: MySQL Shell 8.0 :: 6.5 AdminAPI MySQL Sandboxes https://dev.mysql.com/doc/mysql-shell/8.0/en/admin-api-sandboxes.html
How to repeat:
My MySQL 8.0.23 is /usr/mysql/8.0.23/bin/mysqld.
$ ll /usr/mysql/8.0.23/bin/mysqld
-rwxr-xr-x 1 yoku0825 yoku0825 1194848048 Jan 19 16:18 /usr/mysql/8.0.23/bin/mysqld
Set PATH environment variable as document describes.
$ PATH=/usr/mysql/8.0.23/bin/mysqld:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
$ echo $PATH
/usr/mysql/8.0.23/bin/mysqld:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
Run dba.deploySandboxInstance.
$ mysqlsh
MySQL JS > dba.deploySandboxInstance(3307)
..
Dba.deploySandboxInstance: ERROR: Error creating sandbox: Could not find mysqld executable. Make sure it is on the $PATH environment variable. (RuntimeError)
Correctly, PATH should not be include filename.
$ PATH=/usr/mysql/8.0.23/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
$ echo $PATH
/usr/mysql/8.0.23/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
I can start Sandbox Instance.
$ mysqlsh
MySQL JS > dba.deploySandboxInstance(3307)
..
Instance localhost:3307 successfully deployed and started.
Suggested fix:
Fix example in the document.
MySQL :: MySQL Shell 8.0 :: 6.5 AdminAPI MySQL Sandboxes https://dev.mysql.com/doc/mysql-shell/8.0/en/admin-api-sandboxes.html