{"id":28194318,"url":"https://github.com/humansinput/mysql-applescript","last_synced_at":"2026-01-25T19:08:36.063Z","repository":{"id":128773666,"uuid":"237225333","full_name":"humansinput/mysql-applescript","owner":"humansinput","description":"A really really basic MySQL Connector for AppleScript that is mostly a wrapper around MySQL CLI client.","archived":false,"fork":false,"pushed_at":"2020-01-30T14:32:57.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T09:12:03.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"AppleScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humansinput.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-30T14:02:24.000Z","updated_at":"2020-01-30T14:29:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"8498aedb-fbf2-4d9b-bcab-f1ca7886ed98","html_url":"https://github.com/humansinput/mysql-applescript","commit_stats":null,"previous_names":["humansinput/mysql-applescript"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fmysql-applescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fmysql-applescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fmysql-applescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humansinput%2Fmysql-applescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humansinput","download_url":"https://codeload.github.com/humansinput/mysql-applescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535800,"owners_count":22087399,"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":[],"created_at":"2025-05-16T13:11:52.586Z","updated_at":"2026-01-25T19:08:31.043Z","avatar_url":"https://github.com/humansinput.png","language":"AppleScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySQL Connector/AppleScript (an unofficial one)\n\n*Copyright (C) Tim K 2019-2020 \u003ctimprogrammer@rambler.ru\u003e*\n\nI know this is something unusual for me to publish an AppleScript library, but I needed a way to interface with MySQL from AS, so I made this. The connector is really basic and requires either a full MySQL installation on your Mac or MySQL Workbench to be installed.\n\n## Usage\n\n```\n-- Our example table has the following columns:\n-- username, password, chatPoints\n\n\nset mySQLServerIP to \"localhost\" -- the server to connect to. Must be a valid MySQL Server 5.5+ powered DB server\nset mySQLUser to \"root\" -- the user to use for the connection. root might be okay for testing purposes, but I would use another user if I were you\nset mySQLPassword to \"meowiemeow\" -- the plain text password for the specified user. If the user does not have a password, just use an empty string.\nset mySQLDatabase to \"catchat\" -- the name of your database. While not needed during connection, will be absolutely required when running INSERT/SELECT queries.\nset mySQLTable to \"users\" -- the name of your table.\n\ntell script \"MySQL\"\n\tset mySQLConnection to connect into mySQLServerIP given username:mySQLUser, password:mySQLPassword -- this will establish the connection to the remote MySQL server with the specified credentials and will return a connection record\n\tset allUserNames to {}\n\t\n\tset selectQueryResult to select in mySQLTable given database:mySQLDatabase, filter:{}, connection:mySQLConnection, columns:{\"username\"}\n\t-- the above line will run a select query on the specified table\n\t-- it will return a list of records\n\t-- the above line will run this query:\n\t-- SELECT username FROM catchat.users;\n\trepeat with recordPtr in selectQueryResult\n\t\tset end of allUserNames to (username of recordPtr) as text\n\tend repeat\n\n\tset whatToDo to button returned of (display dialog \"What would you like to do?\" buttons {\"View all users\", \"Add a new one\"}\n\tif whatToDo starts with \"View all\" then\n\t\tchoose from list allUserNames with prompt \"Available users\"\n\telse\n\t\tset un to display dialog \"Username\" default answer \"\"\n\t\tset pswd to display dialog \"Password hash\" default answer \"\"\n\t\tset points to 10\n\t\tif allUserNames contains un then\n\t\t\tdisplay alert \"User '\" \u0026 un \u0026 \"' already exists!\"\n\t\telse\n\t\t\tinsert into mySQLTable given database:mySQLDatabase, connection:mySQLConnection, columns:{\"username\", \"password\", \"chatPoints\"}, values:{un, pswd, points}\n\t\t\t-- will insert into table\n\t\t\tdisplay alert \"Success!\"\n\t\tend if\n\tend if\nend tell\n```\n\nOf course, you can run custom queries to:\n```\ntell script \"MySQL\"\n\tset mySQLConnection to connect into \"localhost\" given username:\"root\", password:\"\"\n\tdisplay alert query given connection:mySQLConnection, query:\"SELECT 1\"\nend tell\n```\n\n## Installation\nGrab a .scpt compiled copy of MySQL Connector/AppleScript from the releases page and put it into ``/Library/Script Libraries``.\n\nNotice, that MySQL Connector/AppleScript requires macOS 10.9 or newer. A Snow Leopard-compatible release might be coming soon.\n\n## License\n0BSD\n\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansinput%2Fmysql-applescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumansinput%2Fmysql-applescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansinput%2Fmysql-applescript/lists"}