npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rgwch/normalize_mysqldb

v0.2.3

Published

Normalize a MariaDB or Mysql database

Downloads

10

Readme

About

This utility normalizes a MariaDB or Mysql database. This means it will convert all table names and all column names to lowercase.

The rationale is: Mysql (and MariaDB) treat table names and field names case insensitive while some tools treat them case sensitive. In older databases, sometimes we are confronted with fields where some clients use "Somefieldname", some prefer "SomeFieldName", others "somefieldname" or even "SOMEFIELDNAME" for the same field. This leads to confusion when we apply ORM tools in case sensitive languages.

To reduce such confusion, we radically convert all to lowercase. This conforms to mysql recommendations.

Install

npm install -g normalize_mysqldb

Precautions

On case sensitive file systems, MyIsam table names are case sensitive by default. To avoid this, you should apply the following setting in my.cfg :

lower_case_table_names=1

after running normalize_mysqldb and restart the mysql server. (Do not apply the setting before normalizing, since mixed case table names won't be accessible any more then.)

Usage

normalize_mysqldb -u username -p password -d database -h hostname

WARNING The tool will immediately convert the database. So, if you're not sure: Use it only on a database copy.

Troubleshoot

On some newer Mysql-Servers (>=8) you might encounter an error message simililar to the following:

Client does not support authentication protocol requested by server, consider upgrading mysql client

Probably this error will go away, as npm-mysql2 upgrades to the newer protocol. Until then you can do the following:

From the mysql client commandline enter:

ALTER USER my_username@'localhost' IDENTIFIED WITH mysql_native_password BY 'my_password';
flush privileges;

After that, normalize_mysqldb should work for the user my_username with the password my_password.

License

MIT