Possible Duplicate:
How do I connect to a MySQL开发者_运维百科 Database in Python?
There is a way to connect python with a mysql db? I found something, but seems to is only for windows and I'm working with linux.
Use MySQL-Python.
I also strongly advise having a look at SQLAlchemy, an ORM that allows you to write once for all major sql's including MySQL. It's a bit more complex, but the flexibility is a serious advantage.
You can use the MySQL-Python package. Search your disto's package database first before installing from source (you probably already have it there). Be aware that all database packages do (our should) adhere to the Python DB API. This provides a standardized interface to all databases.
If you are comfortable with writing SQL, then that should suffice. If you prefer to query and define data in pure python I would also recommend SQLAlchemy.
精彩评论