----------------------------------------------
< DBDB, What a great database version manager! >
----------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
git clone https://github.com/pj8/dbdb.git
cd dbdb
MySQL
./mysql/{create|start|stop|restart|port|status|connect|delete}.sh {name} {mysqlVersion} {port}
# e.g. Create MySQL server.
./mysql/create.sh mysql1 5.7.31 3306
# e.g. Create another one.
./mysql/create.sh mysql2 8.0.30 13306
# e.g.
./mysql/start.sh mysql1
./mysql/stop.sh mysql1
./mysql/restart.sh mysql1
./mysql/port.sh mysql1
./mysql/status.sh mysql1
./mysql/connect.sh mysql1
./mysql/delete.sh mysql1
# e.g. Create with random port.
./mysql/create.sh mysql1 5.7.31 random
# e.g. Try create, then start server.
./mysql/create-start.sh mysql1 5.7.31 3306
- 5.7.31
- 8.0.23
- 8.0.30
PostgreSQL
./postgresql/{create|start|stop|restart|port|status|connect|delete}.sh {name} {postgresqlVersion} {port}
# e.g.
./postgresql/create.sh pg1 12.4 5432
./postgresql/start.sh pg1
./postgresql/stop.sh pg1
./postgresql/restart.sh pg1
./postgresql/port.sh pg1
./postgresql/status.sh pg1
./postgresql/connect.sh pg1
./postgresql/delete.sh pg1
- 12.4
- 12.6
- 13.2
Redis
./redis/{create|start|stop|restart|port|status|connect|delete}.sh {name} {redisVersion} {port}
# e.g.
./redis/create.sh redis1 6.2.14 6379
./redis/start.sh redis1
./redis/stop.sh redis1
./redis/restart.sh redis1
./redis/port.sh redis1
./redis/status.sh redis1
./redis/connect.sh redis1
./redis/delete.sh redis1
- 6.0.16
- 6.2.14
- 7.0.15
- 7.2.5
MongoDB
./mongodb/{create|start|stop|restart|port|status|connect|delete}.sh {name} {mongodbVersion} {port}
# e.g.
./mongodb/create.sh mongo1 4.4.3 27017
./mongodb/start.sh mongo1
./mongodb/stop.sh mongo1
./mongodb/restart.sh mongo1
./mongodb/port.sh mongo1
./mongodb/status.sh mongo1
./mongodb/connect.sh mongo1
./mongodb/delete.sh mongo1
- 4.4.10
- 5.0.3
Memcached
./memcached/{create|start|stop|restart|port|status|connect|delete}.sh {name} {memcachedVersion} {port}
# e.g.
./memcached/create.sh memcached1 1.6.31 11211
./memcached/start.sh memcached1
./memcached/stop.sh memcached1
./memcached/restart.sh memcached1
./memcached/port.sh memcached1
./memcached/status.sh memcached1
./memcached/connect.sh memcached1
./memcached/delete.sh memcached1
- 1.6.31
/path/to/dbdb/mysql/create.sh mysql5-foo 5.7.31 random
/path/to/dbdb/mysql/port.sh mysql5-foo
# Create and start
/path/to/dbdb/mysql/create-start.sh mysql5-foo 5.7.31 3306
- You can use
dbdb.sh
for that.
./dbdb.sh
# Start mysql5
@reboot /path/to/dbdb/mysql/start.sh mysql5-foo
# Start mysql8 with port 13306
@reboot /path/to/dbdb/mysql/start.sh mysql8-bar
# Create and start
@reboot /path/to/dbdb/redis/create-start.sh redis1 6.0.10 6379