
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Mysqlman is a tool manage users for MySQL. You can start management with writing some yaml files and executing some commands. And mysqlman provide feature to manage privileges(global, schema, table, but column)
Add this line to your application's Gemfile:
gem 'mysqlman'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mysqlman
Firstly, please create file for connecting MySQL.
Please set the file in executing dir config/manager.yml
---
host: 127.0.0.1
username: root
password: passw0rd
The manager needs some privileges. The read privileges to manage other users are following.
schema | table | columns |
---|---|---|
mysql | user | User, Host |
information_schema | USER_PRIVILEGES | PRIVILEGE_TYPE, IS_GRANTABLE |
information_schema | SCHEMA_PRIVILEGES | TABLE_SCHEMA, PRIVILEGE_TYPE, IS_GRANTABLE |
information_schema | TABLE_PRIVILEGES | TABLE_SCHEMA, TABLE_NAME, PRIVILEGE_TYPE, IS_GRANTABLE |
And ofcourse, the manager needs privileges that you want to manage with grant option.
Second, initialize the config. In initializing, mysqlman do followings.
Execute:
$ mysqlman init
Exclude users (=Unmanaged users) are that users are already exist in MySQL.
Exclude users are written in excludes.d/default.yml
by default.
If you want to add unmanaged user, or to manage user written in excludes config, please edit the file by yourself.
Write user, role settings. please confirm how to write them.
Role is config of database privileges. All users are belong to one of roles.
In roles.d/engineer.yml
as example:
---
engineer: # require: as a role name
global: # optional: global privileges
- select
schema: # optional: schema privileges
example_schema1: # requrie: schema name
- update
- insert
example_schema2:
- update
table: # optional: table privileges
example_schema1: # require: schema name
example_table: # require: table name
- delete:
You can write privilege type in format of followings.
ALL
type privileges alias of some some privileges of the target level.
Please confirm following.
(WIP) All privileges
GRANT OPTION
is not included in ALL
privileges.
If you want add the privileges, please set bot of them.
User is config of information to connect Mysql. All users are belong one of roles.
In users.d/engineers.yml
:
---
engineer: # require: the role name
- onunu: # require: user name
- application_user:
host: 10.0.0.1 # optional: connectable host(default '%')
After writing settings, please apply them.
You can confirm changes witout appling settings.
$ mysqlman dryrun
If the changes are same as your plan, please execute apply command.
$ mysqlman apply
Changes are put in STDOUT.
Bug reports and pull requests are welcome on GitHub at https://github.com/onunu/mysqlman.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that mysqlman demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.