Manage users in MariaDB >= 10.1.1

Latest on Hackage:0.1.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed and maintained by Igor Pashev

Juan de la Cosa

HTTP server for managing MariaDB users. Designed to work behind Sproxy and assuming users’ logins are their email addresses (MariaDB allows up to 80 characters).

Currently it only let users get new passwords.


Juan de la Cosa is written in Haskell with GHC. All required Haskell libraries are listed in juandelacosa.cabal. Use cabal-install to fetch and build all pre-requisites automatically.


$ git clone https://github.com/zalora/juandelacosa.git
$ cd juandelacosa
$ cabal install


Type juandelacosa --help to see usage summary:

  juandelacosa [options]

  -f, --file=MYCNF         Read this MySQL client config file
  -g, --group=GROUP        Read this options group in the above file [default: client]

  -d, --datadir=DIR        Data directory including static files [default: <cabal data dir>]

  -s, --socket=SOCK        Listen on this UNIX-socket [default: /tmp/juandelacosa.sock]
  -p, --port=PORT          Instead of UNIX-socket, listen on this TCP port (localhost)

  -h, --help               Show this message

Database Privileges

CREATE USER IF NOT EXISTS 'juandelacosa'@'localhost' IDENTIFIED VIA unix_socket;
REVOKE ALL, GRANT OPTION FROM 'juandelacosa'@'localhost';
GRANT UPDATE ON `mysql`.* TO 'juandelacosa'@'localhost';
GRANT SELECT ON `mysql`.`user` TO 'juandelacosa'@'localhost';


Reset Password Password Chnaged No Account



  • Write user ID (the “From” header) in logs
  • Some improvements in UI for better UX


  • Added simple Web UI for resetting user password. Using bundled Bootstrap and jQuery.


  • Initial version
  • Only reset user password on any request
comments powered byDisqus