Sandbox shortcut tool sb + prefixed sandboxes

Asked by p4guru

Having some problem trying to call the sandbox shortcut tool for sb with sandbox versions installed with a prefix ?

Using Sandbox 3.0.32 on CentOS 6.4 64bit OS

I installed 3 sandboxes

1. MariaDB 5.5.30 with prefix mdb55
2. MariaDB 10.01 with prefix mdb10
3. MySQL 5.6.11 no prefixes

I can call MySQL 5.6.11 fine using

sb 5611 -e "SELECT VERSION()"
+-----------+
| VERSION() |
+-----------+
| 5.6.11 |
+-----------+

But can't get the prefixed versions to work ? i.e.

sb mdb555530 -e "SELECT VERSION()"

All info for 3 sandboxes

sbtool -o info

$ports = {
           '5530' => 0,
           '55100' => 0,
           '5611' => 1
         };
$all_info = {
              '5530' => {
                          'opt' => {
                                     'tmpdir' => '/root/sandboxes/msb_mdb555_5_30/tmp',
                                     'datadir' => '/root/sandboxes/msb_mdb555_5_30/data',
                                     'port' => '5530',
                                     'basedir' => '/root/optmysql/mariadb55/mdb555.5.30',
                                     'socket' => '/tmp/mysql_sandbox5530.sock',
                                     'prompt' => '\'mysql [\\h] {\\u} (\\d) > \'',
                                     'pid_file' => '/root/sandboxes/msb_mdb555_5_30/data/mysql_sandbox5530.pid',
                                     'password' => 'msandbox',
                                     'user' => 'root',
                                     'log_error' => 'msandbox.err'
                                   },
                          'conf' => undef
                        },
              '55100' => {
                           'opt' => {
                                      'tmpdir' => '/root/sandboxes/msb_mdb105_5_100/tmp',
                                      'datadir' => '/root/sandboxes/msb_mdb105_5_100/data',
                                      'port' => '55100',
                                      'basedir' => '/root/optmysql/mariadb10/mdb105.5.100',
                                      'socket' => '/tmp/mysql_sandbox55100.sock',
                                      'prompt' => '\'mysql [\\h] {\\u} (\\d) > \'',
                                      'pid_file' => '/root/sandboxes/msb_mdb105_5_100/data/mysql_sandbox55100.pid',
                                      'password' => 'msandbox',
                                      'user' => 'root',
                                      'log_error' => 'msandbox.err'
                                    },
                           'conf' => undef
                         },
              '5611' => {
                          'opt' => {
                                     'tmpdir' => '/root/sandboxes/msb_5_6_11/tmp',
                                     'datadir' => '/root/sandboxes/msb_5_6_11/data',
                                     'port' => '5611',
                                     'basedir' => '/root/optmysql/mysql56/5.6.11',
                                     'socket' => '/tmp/mysql_sandbox5611.sock',
                                     'prompt' => '\'mysql [\\h] {\\u} (\\d) > \'',
                                     'pid_file' => '/root/sandboxes/msb_5_6_11/data/mysql_sandbox5611.pid',
                                     'password' => 'msandbox',
                                     'user' => 'root',
                                     'log_error' => 'msandbox.err'
                                   },
                          'conf' => undef
                        }
            };

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Sandbox Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Giuseppe Maxia (giuseppe-maxia) said :
#1

The 'sb' shortcut does not support prefixed installations. The reason is that it uses its own prefixes: 'r' for replication and 'm' for multiple.
In order to support prefixed sandboxes, we should break this paradigm.

Revision history for this message
p4guru (p4guru) said :
#2

Maybe have an additional make_sandbox option for --alias to give install instances an alias name and have a new tool called sbalias which can lookup alias instances to manage via shortcut ?

Revision history for this message
Giuseppe Maxia (giuseppe-maxia) said :
#3

Would you care to submit a patch for that?

Revision history for this message
p4guru (p4guru) said :
#4

Unfortunately, I'm no coder :o

Can you help with this problem?

Provide an answer of your own, or ask p4guru for more information if necessary.

To post a message you must log in.