{"id":15513812,"url":"https://github.com/evgeni/my_virtualenv","last_synced_at":"2025-04-23T03:13:15.968Z","repository":{"id":12501776,"uuid":"15171374","full_name":"evgeni/my_virtualenv","owner":"evgeni","description":"Create throw-away MySQL servers for regression tests","archived":false,"fork":false,"pushed_at":"2023-10-04T04:44:59.000Z","size":26,"stargazers_count":6,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"devel","last_synced_at":"2025-03-29T21:32:11.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evgeni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-12-13T18:54:53.000Z","updated_at":"2023-04-05T15:20:04.000Z","dependencies_parsed_at":"2022-08-31T11:13:23.345Z","dependency_job_id":null,"html_url":"https://github.com/evgeni/my_virtualenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgeni%2Fmy_virtualenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgeni%2Fmy_virtualenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgeni%2Fmy_virtualenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgeni%2Fmy_virtualenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evgeni","download_url":"https://codeload.github.com/evgeni/my_virtualenv/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360506,"owners_count":21417721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:55:21.570Z","updated_at":"2025-04-23T03:13:15.944Z","avatar_url":"https://github.com/evgeni.png","language":"Shell","readme":"my_virtualenv -- Create throw-away MySQL servers for regression tests\n=====================================================================\n\nEver quickly needed a fresh MySQL server to run some tests?\nAlways envied PostgreSQL for the cool [`pg_virtualenv`][pve]?\nNow you can have a piece of the cake too!\n\nInstallation\n------------\n\n`git clone https://github.com/evgeni/my_virtualenv.git`\n\nThere is no fancy shell script you can `curl ... | sh` (well, actually... nononono, forget it!).\n\nDependencies\n------------\n\n * a POSIX compatible shell\n * MySQL (tested with 8.0) or MariaDB (tested with 10.6), other versions and flavors should work but are untested\n * either [`pwgen`][pwgen] or an MD5 command line tool (either `md5sum` from GNU coreutils or `md5` from OSX or OpenSSL)\n * either `ss` (from [iproute2][iproute2]) or `nc` (from any netcat implementation)\n\nConfiguration\n-------------\n\nWell, there is none, really.\n\nUsage\n-----\n\nEither just call `my_virtualenv` and get a fresh shell with a `mysqld` running in the background:\n\n    $ my_virtualenv\n    $ mysql\n    Welcome to the MySQL monitor.  Commands end with ; or \\g.\n    Your MySQL connection id is 4\n    Server version: 5.5.33-1 (Debian)\n\n    Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.\n\n    Oracle is a registered trademark of Oracle Corporation and/or its\n    affiliates. Other names may be trademarks of their respective\n    owners.\n\n    Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\n    mysql\u003e \n\nOr wrap your tests with it:\n\n    $ my_virtualenv make test\n    echo \"CREATE DATABASE test;\" | mysql\n    run-your-cool-mysql-depending-tests\n\nAfter the command/shell terminates, the running `mysqld` gets killed and all the data is removed.\n\nEnvironment\n-----------\n\nWhen running `my_virtualenv`, your environment gets poluted with the following (useful) vars:\n\n * `MYSQL_USER` - the user you can connect as\n * `MYSQL_PWD` - the password of your user\n * `MYSQL_HOME` - the place to find `my.cnf`\n * `MYSQL_HOST` - the host `mysqld` is running on (always `localhost`)\n * `MYSQL_TCP_PORT` - the TCP port of `mysqld`\n * `MYSQL_UNIX_PORT` - the path to the `mysqld` socket\n\n\n[pve]: https://salsa.debian.org/postgresql/postgresql-common/-/blob/master/pg_virtualenv\n[pwgen]: http://sourceforge.net/projects/pwgen/\n[iproute2]: https://www.kernel.org/pub/linux/utils/net/iproute2/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgeni%2Fmy_virtualenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgeni%2Fmy_virtualenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgeni%2Fmy_virtualenv/lists"}