{"repo":"crystal-lang/crystal-mysql","free":true,"listed":false,"github":"https://github.com/crystal-lang/crystal-mysql","clone":"git clone https://github.com/crystal-lang/crystal-mysql.git","description":"MySQL connector for Crystal","language":"Crystal","stars":110,"topics":["crystal","database","mysql","driver"],"license":"MIT","category":"databases-storage","readme_excerpt":"crystal-mysql MySQL driver implement natively in Crystal, without relying on external libraries. Check crystal-db for general db driver documentation. crystal-mysql driver is registered under mysql:// uri. Why Using a natively implemented library has a significant performance improvement over working with an external library, since there is no need to copy data to and from the Crystal space and the native code. Initial tests with the library have shown a 2x-3x performance boost, though additional testing is required. Also, going through the MySQL external library blocks the Crystal thread using it, thus imposing a significant penalty to concurrent database accesses, such as those in web servers. We aim to overcome this issue through a full Crystal implementation of the MySQL driver that plays nice with non-blocking IO. Status This driver is a work in progress. It implements mysql's binary protocol to create prepared statements. Contributions are most welcome. Installation Add this to your application's shard.yml : Usage When running this example, if you get the following exception: Unhandled exception: Client does not support authentication protocol requested by server; consider upgrading MySQL client (Exception) You have two options, set a password for root, or (most recommended option) create another user with access to test database. Then use the example above changing the DB.open line to Connection URI The connection string has the following syntax: Transport The driver s","default_branch":null,"files":null,"tree":[],"storefront":"/r/crystal-lang","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/crystal-lang/crystal-mysql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}