{"id":18806726,"url":"https://github.com/lefred/mysqlshell-plugins","last_synced_at":"2025-08-20T04:33:00.618Z","repository":{"id":36794739,"uuid":"209096908","full_name":"lefred/mysqlshell-plugins","owner":"lefred","description":"Plugins for MySQL Shell","archived":false,"fork":false,"pushed_at":"2024-04-22T05:09:49.000Z","size":354,"stargazers_count":132,"open_issues_count":8,"forks_count":48,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-26T01:34:06.174Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/__init__.py","citation":null,"codeowners":null,"security":"security/__init__.py","support":"support/collect.py","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-17T15:56:47.000Z","updated_at":"2024-10-30T11:29:40.000Z","dependencies_parsed_at":"2023-11-10T18:28:48.239Z","dependency_job_id":"9f4d7641-45d2-4117-b669-570b8e30b164","html_url":"https://github.com/lefred/mysqlshell-plugins","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysqlshell-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysqlshell-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysqlshell-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysqlshell-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefred","download_url":"https://codeload.github.com/lefred/mysqlshell-plugins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394228,"owners_count":18218707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-07T22:49:24.630Z","updated_at":"2024-12-19T07:07:17.884Z","avatar_url":"https://github.com/lefred.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql-shell-ex\nA collection of MySQL Shell example plugins (MySQL Shell \u003e= 8.0.22).\n\nAfter installing this plugin collection into the `.mysqlsh/plugins/` folder, all the plugins will be automatically loaded at MySQL Shell startup.\n\nTo get help about the individual plugins type `\\? \u003cplugin\u003e`.\n\n```\nMySQL JS\u003e \\? schema_utils\nNAME\n      schema_utils - Schema management and utilities.\n\nDESCRIPTION\n      A collection of schema management tools and related utilities that work\n      on schemas.\"\n\nFUNCTIONS\n      deleteProcedures([schema][, routine][, session])\n            Delete stored procedures.\n\n      help([member])\n            Provides help about this object and it's members\n\n      showDefaults(table[, schema][, session])\n            Lists the default values of each column in a table.\n\n      showInvalidDates([table][, schema][, session])\n            Show Invalid Dates\n\n      showProcedures([schema][, session])\n            Lists all stored procedures of either all schemas or a given\n            schema.\n\n      showRoutines([schema][, session])\n            Show Routines.\n\n\nMySQL JS\u003e schema_utils.showProcedures()\n+----------------+-------------------------------------+\n| ROUTINE_SCHEMA | ROUTINE_NAME                        |\n+----------------+-------------------------------------+\n| sys            | extract_schema_from_file_name       |\n| sys            | extract_table_from_file_name        |\n...\n\nMySQL JS\u003e \\py\nSwitching to Python mode...\n\nMySQL PY\u003e schema_utils.show_procedures()\n+----------------+-------------------------------------+\n| ROUTINE_SCHEMA | ROUTINE_NAME                        |\n+----------------+-------------------------------------+\n| sys            | extract_schema_from_file_name       |\n| sys            | extract_table_from_file_name        |\n...\n```\n\n## Installation\nTo install this demo on your machine type the following commands after you have installed the MySQL Shell and the git command line tools.\n\nThis will clone the repository and copy the files to the right path in order to be automatically loaded on MySQL Shell startup.\n\n### macOS / Linux\n```\n$ mkdir -p ~/.mysqlsh/plugins\n$ git clone https://github.com/lefred/mysqlshell-plugins.git ~/.mysqlsh/plugins\n```\n\n### Windows\n```\n$ mkdir %AppData%\\MySQL\\mysqlsh\\plugins\n$ git clone https://github.com/lefred/mysqlshell-plugins.git %AppData%\\MySQL\\mysqlsh\\plugins\n```\n## Missing Modules\n\nIt might be possible that for some plugins, your are missing some modules. Usually it is ``python3-requests``.\n\nYou can then just install it. However, on some systems, the version of Python 3 doesn't match the version\nlinked with MySQL Shell. This is the case with OL7/OL8 where Python 3.6 is installed and MySQL Shell Enterprise build provides\nPython 3.7.\n\nIf this is the case for you, you can install the missing modules within MySQL Shell too using ``mysqlsh --pym pip``.\n\n**Example with requests**:\n\nFor the router and proxySQL plugin, ``requests`` is required, if you don't have it installed, when you start MySQL Shell, you\nwill get this message:\n\n```\nError importing module 'requests', check if it's installed (Python 3.7.7)\n```\n\nYou have 2 options, install it system wide (available for all users), if you have root access, or just for your user:\n\n```\n$ sudo mysqlsh --pym pip install requests\n```\n\nor \n\n```\n$ mysqlsh --pym pip install --user requests\n```\n\nThat's it ! \n\n\n## Extending the MySQL Shell\n\nPlease take a look at the demo/init.py file to learn how to extend the MySQL Shell with plugins.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysqlshell-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefred%2Fmysqlshell-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysqlshell-plugins/lists"}