mysql parameters

2009-09-12
2013-05-14
  • What are the parameters I put on the command line to make mysql work.

    I have figured out the -database-url=sqlite|mysql and the file name structure.

    I can not get mysql to work local server or remote server

     
  • figured this out too in case someone else is looking.

    will@bigwill:~$ gourmet -database-url=mysql://USER:PASSWORD@HOST/DB_SCHEMA

    Now I have an sql-alchemy error to figure out LOL

    sqlalchemy.exceptions.OperationalError: (OperationalError) (1170, "BLOB/TEXT column 'ingkey' used in key specification without a key length") '\nCREATE TABLE shopcats (\n\tingkey TEXT NOT NULL,\n\tshopcategory TEXT, \n\tposition INTEGER, \n\tPRIMARY KEY (ingkey)\n)\n\n' {}

     
  • tom
    tom
    2009-09-17

    Although the use of SQLAlchemy should make it trivial to add support to Gourmet, I have not actually ever made Gourmet support it, as there's never been a reason to (people have been happy with SQLite and it requires no set up, etc., which makes it a better choice than MySQL etc. for the vast majority of users).

    If you have a use case for which MySQL would actually be worthwhile, it should be easy to adapt the code, but you will need to write a patch Gourmet (most likely just to src/lib/backends/db.py) to add support for MySQL. In the process, you may well end up opening up Gourmet to more general support of all the backends SQLAlchemy supports.

    Good luck to you!

    (If you're really motivated to do this but don't have the coding skills, you could always offer a bounty… :)

     
  • I am currently working on my python skills which have been found lacking ;)

    I am toying with the idea of helping a teacher friend of mine set up a 'one to many' recipe solution which allows everyone to see the same database from anywhere in the room.

    However "toying" is the key word here LOL