
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Very simple Mysql2 gem precompiled for Amazon Linux 1 & 2 (Ruby 2.5 & 2.7) with statically linked
libmysqlclient
ready for any AWS Lambda usage, including Rails. Add it to your Gemfile:
# When using Rails.
gem 'mysql2-lambda'
# When NOT using Rails.
gem 'mysql2-lambda', require: 'mysql2'
Part of a suite of open source projects from Lamby: Simple Rails & AWS Lambda Integration using Rack. Details include:
We used the amazon/aws-sam-cli-build-image-ruby2.5
Docker image from the SAM CLI project to build the MySQL Connector/C's libmysqlclient
. From there we ensure the Mysql2 gem statically includes that library. The resulting packaged gem and mysql2.so
file looks something like this.
$ ldd mysql2.so
linux-vdso.so.1 => (0x00007ffcb15d4000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa8ebd21000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa8ebb19000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa8eb8fd000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fa8eb687000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa8eb483000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa8eb24c000)
libm.so.6 => /lib64/libm.so.6 (0x00007fa8eaf4a000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa8eab7c000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa8ea966000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa8ec72e000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007fa8ea764000)
Clone or fork this repository, make sure you have Docker installed, then run the following commands.
./bin/setup
./bin/build
You will now have a packaged gem in the root of your project. Simple tests to make sure it works.
./bin/test 2.5
./bin/test 2.7
Thanks to all the contributors of the Mysql2
(https://github.com/brianmario/mysql2) gem. The license here is the same as that. MIT.
Everyone interacting in the Mysql2 Lambda project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that mysql2-lambda 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's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.