Giter VIP home page Giter VIP logo

mysql-sandbox's Introduction

Hi there ๐Ÿ‘‹

I am the maintainer of some open source projects such as dbdeployer and test_db.

I have other projects as well, and I welcome feedback on all of them.

You can reach me on Twitter (@datacharmer).

mysql-sandbox's People

Contributors

chorny avatar datacharmer avatar dataclouder avatar dennisbecker avatar dveeden avatar guriandoro avatar iangilfillan avatar kaiwangchen avatar manwar avatar markleith avatar pali avatar yoku0825 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-sandbox's Issues

Global alias for alternative editor

A feature request for your consideration:

I really like the msb global alias to be able to load a shell for something like msb 803. I've found myself adding the alias msbsh so that I can explicitly launch a session with an alternative editor (the ./use command is hard-coded in msb).

I'm not sure if it's better to have an environment variable here - or aliases. As a developer, I find myself wanting to sometimes try things in both shells.

Can't determine MySQL version error with Percona Server 5.6.26

Executed as:
sh@shrzayev:~/Sandboxes$ make_sandbox percona-server-5.6.26-74.0.tar.gz

Got as a result:

Can't exec "/home/sh/Sandboxes/5.6.26/bin/mysql_config": No such file or directory at /usr/local/bin/low_level_make_sandbox line 615. Can't determine MySQL version

Previously i saw can't find a version in Makefile error, but this one is a bit different.

mysqlsh script broken in MySQL Shell 8.0.0 dmr

morgo@ryzen:~/sandboxes/msb_5_7_18$ ./mysqlsh 
Conflicting options: port and socket can not be used together.

I worked around this by removing the socket option. Not sure what you would like to do as a proper fix:

            --port=8003 "$@"
#            --socket=/tmp/mysql_sandbox8003.sock "$@"

start script reports failure because of timeout even though server starts

Start script (bash script that starts server) can sometimes report failure "sandbox server not started yet" because some (re)starts require more than hard coded TIMEOUT=60 (line 1098 MySQL/Sandbox/Scripts.pm).
One example is recreating large InnoDB logs on slow disks. Script reports failure, however, MySQL server starts but not in 60 seconds.
One solution would be to increase this timeout value but then user would wait longer for real failure.
So this is mostly for info.

MariaDB 10.4 cannot be installed

make_sandbox for MariaDB 10.4 tarball fails on following error:

unpacking mariadb-10.4.0-linux-glibc_214-x86_64.tar.gz
unsupported version 10.4

It seems strange that MariaDB 10.4 is unsupported as it is similar/same as MariaDB 10.3. And MariaDB 10.3 is working fine.

error while creating grant tables

[root@localhost Desktop]# make_replication_sandbox mysql-5.7.11-linux-glibc2.5-i686.tar.gz
installing and starting master
error while creating grant tables

error installing the master

(512 )

Sandbox cannot be started if I overrided pid file in my.sandbox.cnf

I installed sandbox in local directory, but then needed to move datadir into different disk. I changed my.sandbox.cnf to reflect changes. This works fine. However, if I also move pid file "start" script stops working.

How to repeat:

  1. ~/build/mysql-sandbox/bin/make_sandbox mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz
  2. Replace

pid-file = /home/sveta/sandboxes/msb_5_7_16/data/mysql_sandbox5716.pid

with

pid-file = /tmp/mysql_sandbox5716.pid

  1. Try to start it:

sveta@Thinkie:~/sandboxes/msb_5_7_16$ ./start
................................................................................................................................................................................... sandbox server not started yet

Suggested fix:

Read pid-file from the configuration file, do not hard code it.

SSL not working on https://mysqlsandbox.net/

The error from Firefox is

mysqlsandbox.net uses an invalid security certificate. The certificate is only valid for the following names: mysqlsandbox.org, databasesandbox.com, databasesandbox.net, databasesandbox.org, mail.databasesandbox.com, mail.databasesandbox.net, mail.databasesandbox.org, mail.mysqlsandbox.org, www.databasesandbox.com, www.databasesandbox.net, www.databasesandbox.org, www.mysqlsandbox.org Error code: SSL_ERROR_BAD_CERT_DOMAIN

As a result, I need to at least temporarily downgrade the protocol for the homepage in the Homebrew formula. See Homebrew/homebrew-core#12746.

Reported missing files

I know nothing about perl, but was asked to inform the author about these so here they are.

# perl Makefile.PL 
Checking if your kit is complete...
Warning: the following files are missing in your kit:
    MYMETA.json
    MYMETA.yml
Please inform the author.
Writing Makefile for MySQL::Sandbox

No installation issues though, the program works like a charm.
Thanks โค๏ธ!

how to set 'SANDBOX_AS_ROOT'

[root@localhost arp]# make_replication_sandbox --how_many_slaves=3 --sandbox_base_port=21288 --upper_directory=/arp/Zmysql /arp/mysql-5.6.29.tar.gz
MySQL Sandbox should not run as root

If you know what you are doing and want to
run as root nonetheless, please set the environment
variable 'SANDBOX_AS_ROOT' to a nonzero value

mysql home

how do i find mysql home on my rhl6 server as my sandbox is running fine

as i don't see it in /usr/bin

Add support for optional XtraBackup backup command creation after installation, for testing backups

Hi,
Mainly I am using Sandboxes installing MySQL from source and for XtraBackup tests based on new releases etc.
Using simple scripts as:
For master:

root@sh-ubuntu:~# cat backup_rsandbox_compressed_column.sh
xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/my.sandbox.cnf --backup --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/data/ --target-dir=/home/backup_dir/full/ --user=msandbox --password=msandbox --no-version-check

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc1 --incremental-basedir=/home/backup_dir/full --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/data/  --user=msandbox --password=msandbox --no-version-check

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc2 --incremental-basedir=/home/backup_dir/inc/inc1 --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/data/  --user=msandbox --password=msandbox --no-version-check

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc3 --incremental-basedir=/home/backup_dir/inc/inc2 --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/master/data/  --user=msandbox --password=msandbox --no-version-check

For slave:

root@sh-ubuntu:~# cat backup_rsandbox_compressed_column_slave.sh
xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/my.sandbox.cnf --backup --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/data/ --target-dir=/home/backup_dir/full/ --user=msandbox --password=msandbox --no-version-check --slave-info --safe-slave-backup

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc1 --incremental-basedir=/home/backup_dir/full --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/data/  --user=msandbox --password=msandbox --no-version-check --slave-info --safe-slave-backup

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc2 --incremental-basedir=/home/backup_dir/inc/inc1 --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/data/  --user=msandbox --password=msandbox --no-version-check --slave-info --safe-slave-backup

sleep 10

xtrabackup --defaults-file=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/my.sandbox.cnf --backup --target-dir=/home/backup_dir/inc/inc3 --incremental-basedir=/home/backup_dir/inc/inc2 --datadir=/home/sh/sandboxes/rsandbox_percona-server-5_6_32/node1/data/  --user=msandbox --password=msandbox --no-version-check --slave-info --safe-slave-backup

For prepare:

root@sh-ubuntu:~# cat prepare_rsandbox_compressed_column.sh
xtrabackup --defaults-file=/home/backup_dir/full/backup-my.cnf --prepare --apply-log-only --target-dir=/home/backup_dir/full

xtrabackup --defaults-file=/home/backup_dir/full/backup-my.cnf --prepare --apply-log-only --target-dir=/home/backup_dir/full --incremental-dir=/home/backup_dir/inc/inc1

xtrabackup --defaults-file=/home/backup_dir/full/backup-my.cnf --prepare --apply-log-only --target-dir=/home/backup_dir/full --incremental-dir=/home/backup_dir/inc/inc2

xtrabackup --defaults-file=/home/backup_dir/full/backup-my.cnf --prepare --target-dir=/home/backup_dir/full --incremental-dir=/home/backup_dir/inc/inc3

And for each version of installed server I am going to create those new bash files which is tedious at some point and It is going to be messy if you have 20 versions :)
Is it possible to add some optional -> optional_scripts directory and create those bash files for each sandbox respectively?
Something like:

/home/sh/sandboxes/rsandbox_percona-server-5_6_32/optional-scripts/backup_master-5_6_32.sh
/home/sh/sandboxes/rsandbox_percona-server-5_6_32/optional-scripts/backup_node1-5_6_32.sh
/home/sh/sandboxes/rsandbox_percona-server-5_6_32/optional-scripts/backup_prepare-5_6_32.sh

Failed make_replication_sandbox creation with -> [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc05_c_0.frm' (errno: 13 - Permission denied)

It seems to be the make_replication_sandbox failing if there are temporary files from another mysql run inside /tmp.

Any idea how to avoid this? :

$ make_replication_sandbox percona-server-5.7.17-11-linux-x86_64.tar.gz
installing and starting master
error while creating grant tables
2017-03-21T14:58:57.543129Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2017-03-21T14:58:57.543196Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2017-03-21T14:58:57.543372Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-03-21T14:59:03.121654Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-03-21T14:59:04.780440Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-03-21T14:59:05.645718Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: edb208fd-0e46-11e7-bfac-002590e9b448.
2017-03-21T14:59:06.010342Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-03-21T14:59:06.297322Z 0 [Warning] CA certificate ca.pem is self signed.
2017-03-21T14:59:06.400261Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc05_c_0.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400292Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc2d_a_f.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400302Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_7.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400315Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_9.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400325Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc05_c_5.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400334Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc2d_a_0.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400344Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_2.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400363Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc05_c_7.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400381Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc05_c_1.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400391Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_3.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400401Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc2d_a_3.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400410Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_b.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400420Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_11.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400429Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc2d_a_5.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400438Z 0 [ERROR] /home/shahriyar.rzaev/percona-server/5.7.17/bin/mysqld: Can't find file: '/tmp/#sqlc58_a_c.frm' (errno: 13 - Permission denied)
2017-03-21T14:59:06.400824Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

error installing the master

(65280 )

Recent versions of MariaDB are compressed

Running make_sandbox against recent versions of MariaDB fails, for example:
make_sandbox mariadb-10.3.2-linux-glibc_214-x86_64.tar.gz unpacking /home/ian/MariaDB_Downloads/mariadb-10.3.2-linux-glibc_214-x86_64.tar.gz /bin/tar: Archive is compressed. Use -z option /bin/tar: Error is not recoverable: exiting now
Changing line 222 from
my $result = system("gunzip -c $tar_file | $tar_executable -xf -");
to
my $result = system("gunzip -c $tar_file | $tar_executable -zxf -");
fixes the problem, but it would be good to handle this gracefully.

Manage TCP port for X Protocol

MySQL Sandbox does change the mysql port (3306) for the client and server to make it possible to use multiple sandboxes on the same host. However it does not change the port for the mysqlx port (33060).

Suggestion: Set the mysqlx port to 10 x classic_port (e.g. add a zero to the portnumber) or use the next free port after 33060 (first sandbox 33061, second 33062, etc).

Add new option `--master_ip` for `make_replication_sandbox`

make_replication_sandbox uses hardcoded CHANGE MASTER TO master_host='127.0.0.1'
This isn't a problem itself because the nodes are all local, but there are other factors that can break the setup of replication.
For example:

  • using make_replication_sandbox --remote_access=10.1.2.3 will create a user [email protected] ;
  • using make_replication_sandbox --node_options="--bind-address=0.0.0.0" will create all users with host=0.0.0.0 .
    Either way, replication won't setup correctly.

A possible solution is to add a new option --master_ip to specify the IP of the master.
Thanks

Accessing sandbox from linux terminal

Hi,

The sandbox which is created is accessible from the terminal if "--host=127.0.0.1" is added. Without it, it is not working. Is it possible to add that in the ReadMe so that there is no need to look for it anywhere?

mysql -u "username" --host=127.0.0.1 --port=5172 -p

Thanks.

Doesn't work with paths containing a space

Installing with the following parameters:
upper_directory                = /Volumes/Macintosh HD/Users/robertson/sandboxes
sandbox_directory              = msb_5_7_9
sandbox_port                   = 5709
check_port                     = 
no_check_port                  = 
datadir_from                   = script
install_version                = 5.7
basedir                        = /Volumes/Macintosh HD/Users/robertson/Downloads/5.7.9
tmpdir                         = 
my_file                        = 
operating_system_user          = robertson
db_user                        = msandbox
remote_access                  = 127.%
bind_address                   = 127.0.0.1
ro_user                        = msandbox_ro
rw_user                        = msandbox_rw
repl_user                      = rsandbox
db_password                    = msandbox
repl_password                  = rsandbox
my_clause                      = log-error=msandbox.err
master                         = 
slaveof                        = 
high_performance               = 
prompt_prefix                  = mysql
prompt_body                    =  [\h] {\u} (\d) > 
force                          = 
no_ver_after_name              = 1
verbose                        = 
load_grants                    = 1
no_load_grants                 = 
no_run                         = 
no_show                        = 
keep_uuid                      = 
history_dir                    = 
do you agree? ([Y],n) 
Can't exec "/Volumes/Macintosh": No such file or directory at /usr/local/bin/low_level_make_sandbox line 615.
Can't determine MySQL version

It actually did create the sandbox folder and there's stuff in it, but I have no idea what it was trying to exec, so I don't know where it actually failed or whether I've got a working sandbox at all.

perl lib path error

โžœ ~>msb
Can't locate MySQL/Sandbox.pm in @inc (you may need to install the MySQL::Sandbox module) (@inc contains: /usr/local/Cellar/mysql-sandbox/3.1.00/libexec/lib/perl5 /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/mysql-sandbox/3.1.00/libexec/bin/msb line 23.
BEGIN failed--compilation aborted at /usr/local/Cellar/mysql-sandbox/3.1.00/libexec/bin/msb line 23.
โžœ ~>less /usr/local/Library/Formula/mysql-sandbox.rb
class MysqlSandbox < Formula
โžœ ~>ll /usr/local/Cellar/mysql-sandbox/3.1.00/libexec/lib/perl5/
โžœ ~>ll /usr/local/Cellar/mysql-sandbox/3.1.00/lib/perl5/site_perl/
total 0
drwxr-xr-x 3 hongbin admin 102B 10 3 11:59 5.18.2
drwxr-xr-x 4 hongbin admin 136B 10 20 09:24 MySQL
โžœ ~>ll /usr/local/Cellar/mysql-sandbox/3.1.00/lib/perl5/site_perl/MySQL/
total 104
drwxr-xr-x 4 hongbin admin 136B 10 20 09:24 Sandbox
-r--r--r-- 1 hongbin admin 50K 10 20 09:24 Sandbox.pm

Expand passing paramaters to initialization for replication setup

Hi,
Based on:
#23

I could successfully test single server setup.
But for replication setup options are just ignored:

h@sh-ubuntu:~/sandboxes$ /usr/local/bin/make_sandbox_from_source /home/sh/REPOS/ps-5.7-dict_based_compression1/ replication -- -c innodb_page_size=64k --init_option='--innodb-page-size=64K'
tarball older than directory
installing and starting master
installing slave 1
installing slave 2
starting slave 1
. sandbox server started
starting slave 2
. sandbox server started
initializing slave 1
initializing slave 2
replication directory installed in $HOME/sandboxes/rsandbox_5_7_15

From master:

master [localhost] {msandbox} ((none)) > select @@innodb_page_size;
+--------------------+
| @@innodb_page_size |
+--------------------+
|              16384 |
+--------------------+
1 row in set (0.00 sec)

Add support for initializing sandbox with different innodb_page_size

Hi,
I want to share a situation, where I need to initialize MySQL datadir with different innodb_page_size.
It is true especially for 5.7.x versions where new 32k and 64k values added.
I can pass this as "make_sandbox path_to_tarball -- -c innodb_page_size=64k" but it is going to be added into my.sandbox.cnf, after initialization with default 16k. If you try to start server it will fail with:

2016-11-02T10:10:55.730811Z mysqld_safe Starting mysqld daemon with databases from /home/sh/sandboxes/msb_5_7_15/data
2016-11-02T10:10:55.922628Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-02T10:10:55.922710Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-11-02T10:10:55.922745Z 0 [Note] /home/sh/REPOS/ps-5.7-dict_based_compression1/5.7.15/bin/mysqld (mysqld 5.7.15-7-debug-valgrind) starting as process 28723 ...
2016-11-02T10:10:55.930298Z 0 [Warning] InnoDB: innodb-page-size has been changed from the default value 16384 to 65536.
2016-11-02T10:10:55.930385Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-11-02T10:10:55.930392Z 0 [Note] InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
2016-11-02T10:10:55.930396Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-02T10:10:55.930400Z 0 [Note] InnoDB: Uses event mutexes
2016-11-02T10:10:55.930404Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-02T10:10:55.930407Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-11-02T10:10:55.930410Z 0 [Note] InnoDB: Using Linux native AIO
2016-11-02T10:10:55.930743Z 0 [Note] InnoDB: Number of pools: 1
2016-11-02T10:10:55.930830Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-11-02T10:10:55.932853Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-11-02T10:10:55.943753Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-11-02T10:10:55.951484Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-11-02T10:10:55.961496Z 0 [ERROR] InnoDB: Data file './ibdata1' uses page size 16384, but the innodb_page_size start-up parameter is 65536
2016-11-02T10:10:55.961527Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2016-11-02T10:10:55.961537Z 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1967] with error Generic error
2016-11-02T10:10:57.063397Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-11-02T10:10:57.063424Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-11-02T10:10:57.063530Z 0 [ERROR] Failed to initialize plugins.
2016-11-02T10:10:57.063535Z 0 [ERROR] Aborting

2016-11-02T10:10:57.063541Z 0 [Note] Binlog end
2016-11-02T10:10:57.064073Z 0 [Note] /home/sh/REPOS/ps-5.7-dict_based_compression1/5.7.15/bin/mysqld: Shutdown complete

2016-11-02T10:10:57.097105Z mysqld_safe mysqld from pid file /home/sh/sandboxes/msb_5_7_15/data/mysql_sandbox5715.pid ended
msandbox.err (END)

It will be great if we could pass options to datadir initialization as well.

Add mysqlsh script to sandbox

MySQL 5.7.12 adds a new protocol and the ability of running queries in a new shell, which can use SQL or programming languages (currently limited to Javascript and Python.)

What prevented me from adding mysqlsh straight away is that it can run in three modes (js, py, and SQL), two of which required the X protocol to be active.
There are several ways of using them automatically, but none is a quick hack. They require some preliminary checks.

  • (1) The mysqlsh script should run the initialisation for the protocol.
  • (2) We can add a start_x_protocol for sandboxes of MySQL 5.7.12+.
  • (3) We add a --enable_x_protocol option to low_level_make_sandbox
  • (4) We do nothing, and leave the user to deal with the initialisation.

As for the script name, what should it be?

  • (A) pymysqlsh, jsmysqlsh, sqlmysqlsh or mysqlshpy mysqlshjs mysqlshsql
  • (B) mysqlsh with a mandatory 1st parameter that must be one of (js py sql)
  • (C) mysqlsh with its type defined by start_x_protocol (which would accept a shell_type parameter)

fail to load grants when .mylogin.cnf has entry against default login path

When executing load_grants, it fails with the following error when .mylogin.cnf has entry against default login path:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

To repeat the problem, execute mysql_config_editor like below:

shell> mysql_config_editor set --user=foo --password
Enter password:

shell> make_sandbox 5.7.18

I suggest to add --login-path='' to MYSQL variable within load_grants.

Cant create mysql from already installed MySQL binary

I am trying to create mysql sandbox from my existing installed mysql in my ubuntu-server vm however I got an error.

$ make_sandbox_from_installed 5.7.20
can't find mysql libraries in (/usr /usr/local /usr/local/mysql)

I also tried to execute via sudo command but encountered the same.
$ sudo make_sandbox_from_installed 5.7.20
The variable $PWD is undefined - aborting
BEGIN failed--compilation aborted at /usr/local/share/perl/5.22.1/MySQL/Sandbox.pm line 81.
Compilation failed in require at /usr/local/bin/make_sandbox_from_installed line 20.
BEGIN failed--compilation aborted at /usr/local/bin/make_sandbox_from_installed line 20.

I got installed MySQL version 5.7.20 by issuing below command.
$ mysql --version
mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper

make_sandbox_from_installed and make_sandbox_from_source need refactoring

These scripts were designed and tested long time ago, when MySQL 5.1 was still in beta. After that, they have been neglected, and as such they have not been adapted to recent evolution of host operating systems.
The main problem for this neglect is that it is difficult to test properly, as new operating systems and new MySQL versions may change the location of important files.

To make these scripts work properly, we need:

  • a map of file locations in specific operating systems
  • a certification structure in the scripts that will run only on the systems that have been recognized.
  • a method to run the final installing in a more robust way. In some operating systems, using the symlinks fails unless the command runs within the basedir.
  • a method of testing these scripts over time, with a simulation of the operating systems in which they should run.

mysql 5.7 replication sandbox can't install

mysql_test@dyntest-athlon-3700-2gb:/var/bin$ make_replication_sandbox mysql-server_5.7.11-1debian8_amd64.deb-bundle.tar
installing and starting master
error installing the master

(256 )

cannot start sandboxes

I used to start sandboxes successfully at my old linux boxes, ubuntu 14.04 with upstart.
When I try to install it to my new linux box ubuntu 16.04, it failed.

FYI, ubuntu 16.04 comes default with systemd, I thought it would save time, if I just reverted back to upstart. So after I reconfigure it back to upstart, with same configuration with my ubuntu 14.04, I tried to boot the machine and the sandboxes failed to start.

I check at /var/log/upstart, it said:

The variable $USER is undefined - aborting
BEGIN failed--compilation aborted at /usr/local/share/perl/5.22.1/MySQL/Sandbox.pm line 74.
Compilation failed in require at /home/edp/sandboxes/sandbox_action line 20.
BEGIN failed--compilation aborted at /home/edp/sandboxes/sandbox_action line 20.

I'm using mysql sandbox 3.2.0.5 and mariadb 10.1.22

Please help, what should I do next? Thanks.

replicate sandnox to diffrent host

I have two host:
192.168.1.2 and 192.168.1.3 I want 192.168.1.2 to be the master and 192.168.1.3 to be the slave how can i create this kind of replication?

Add support for ccql

ccql is a concurrent, multi-server MySQL client.
Support for it should include:

  • a wrap script to call it on the current sandbox without options, same as ./use and ./mysqlcli
  • a wrap script to send concurrent commands to all nodes in a composite sandbox (replication, multi_sandbox).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.