{"id":43377,"library":"mysql2-cli","title":"MySQL2 CLI","description":"MySQL2 CLI is a simple command-line interface for connecting to MySQL, PostgreSQL, SQLite, and SQL Server databases. Version 1.1.7 provides a unified tool to interact with multiple database engines using connection strings. It supports MySQL, PostgreSQL, SQLite, and SQL Server, with plans for more. The tool is lightweight and designed for quick database exploration from the terminal.","status":"active","version":"1.1.7","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","mysql postgres sqlite sqlserver mariadb"],"install":[{"cmd":"npm install mysql2-cli","lang":"bash","label":"npm"},{"cmd":"yarn add mysql2-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add mysql2-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core MySQL driver for database connections","package":"mysql2","optional":false},{"reason":"PostgreSQL driver for database connections","package":"pg","optional":true},{"reason":"SQLite driver for database connections","package":"better-sqlite3","optional":true},{"reason":"SQL Server driver for database connections","package":"mssql","optional":true}],"imports":[],"quickstart":{"code":"npm install -g mysql2-cli\nmysql2-cli mysql://root:123456@localhost:3306/mysql","lang":"javascript","description":"Install the CLI globally and connect to a MySQL database using a connection string."},"warnings":[{"fix":"Ensure you install 'mysql2-cli' not 'mysql-cli'.","message":"The package name 'mysql2-cli' may be confused with 'mysql-cli'.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.1.7':23 'cli':2,4 'command':9 'command-lin':8 'connect':13,35 'databas':21,32,57 'design':54 'engin':33 'explor':58 'interact':29 'interfac':11 'javascript':62 'lightweight':52 'line':10 'mariadb':67 'multipl':31 'mysql':15,39,63 'mysql2':1,3 'plan':46 'postgr':64 'postgresql':16,40 'provid':24 'quick':56 'server':20,44 'simpl':7 'sql':19,43 'sqlite':17,41,65 'sqlserver':66 'string':36 'support':38 'termin':61 'tool':27,50 'unifi':26 'use':34 'version':22","created_at":"2026-06-05T16:59:30.532856+00:00","updated_at":"2026-06-05T16:59:30.532856+00:00","problems":[{"fix":"Run 'npm install -g mysql2-cli' and ensure npm global bin directory is in PATH.","cause":"CLI not installed globally or not in PATH.","error":"mysql2-cli: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"mysql2-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}