Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit fc2f085

Browse files
committed
Update README to add details on the generate_sql_file script
1 parent 0f8bff4 commit fc2f085

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,30 @@ Or if you would like to log in to the client, and install the 5.7 version:
2121

2222
Alternatively, you could just choose to load individual files based on your needs, but beware, certain objects have dependencies on other objects. You will need to ensure that these are also loaded.
2323

24+
### Generating a single SQL file
25+
26+
There is bash script within the root of the branch directory, called `generate_sql_file.sh`, that allows you to create a single SQL file from the branch.
27+
28+
This includes substitution parameters for the MySQL user to use, and whether to include or exclude `SET sql_log_bin` commands from the scripts. This is particularly useful for installations such as Amazon RDS, which do not have the root@localhost user, or disallow setting sql_log_bin.
29+
30+
When run, this outputs a file named such as `sys_<sys_version>_<mysql_version_identifier>_inline.sql`, i.e. `sys_1.2.0_56_inline.sql` is sys version 1.2.0, built for MySQL 5.6.
31+
32+
#### Options
33+
34+
* v: The version of MySQL to build the sys schema for, either '56' or '57'
35+
* b: Whether to omit any lines that deal with sql_log_bin (useful for RDS)
36+
* u: The user to set as the owner of the objects (useful for RDS)
37+
38+
#### Examples
39+
40+
Generate a MySQL 5.7 SQL file that uses the 'mark'@'localhost' user:
41+
42+
./generate_sql_file.sh -v 57 -u "'mark'@'localhost'"
43+
44+
Generate a MySQL 5.6 SQL file for RDS:
45+
46+
./generate_sql_file.sh -v 56 -b -u CURRENT_USER
47+
2448
## Overview of objects
2549

2650
### Tables

0 commit comments

Comments
 (0)