Tagged Questions
3
votes
0answers
48 views
MySQL/Python preemptive caching
I run a web app that's written in python and uses mysql as our primary datastore. We have a large table with tens of millions of rows on amazon RDS, and expect it to get 10x larger. We run a lot of ...
2
votes
0answers
27 views
Mac: Eclipse error import MySQLdb works fine on command line
I have been trying to install Mysql and Python along with MySQLdb module on MAC. I have been able to do that successfully. From the command line when i do import MySQLdb it works fine. However, I ...
2
votes
0answers
153 views
How to connect with passwords that contains characters like “$” or “@”?
I cannot get a connection to a MySQL database if my password contains punctuation characters in particular $ or @. I have tried to escape the characters, by doubling the $$ etc. but no joy.
I have ...
2
votes
0answers
122 views
Dynamic table names within MYSQL statement (Google Cloud SQL)
I am trying to drop/delete a table from within Google Cloud SQL using Python (App Engine) but I want the table name to be based on a variable, for simplicity I am using 'hello' here. For some reason ...
1
vote
0answers
18 views
What are the required options in order to enable djangodblog for error logging in a MySQL database?
I would like to ask a question about djangodblog used for logging real time Django exception into the application database. I use the following tools
Database: 5.5.28 MySQL Community Server
OS: ...
1
vote
0answers
41 views
error when trying to insert values into MySQL table with python
I'm trying to insert this row of data (i parse from a list of tuples)
(0L, u'2012-11-06T16:23:36-05:00', 0L, None, 23759918L, u'baseline', u'0 to 100', nan, 105114L, 2009524L, True, u'charge', ...
1
vote
0answers
55 views
How do you use views.py to display mysql data in django?
I am a beginner in python and am trying the tutorial below:
http://net.tutsplus.com/tutorials/python-tutorials/python-from-scratch-creating-a-dynamic-website/
I have created a template with the ...
1
vote
0answers
74 views
Twisted adbapi: runInteraction last_insert_id()
class MySQL(object):
def __init__(self):
self.dbpool = adbapi.ConnectionPool(
'MySQLdb',
db='dummy',
user='root',
passwd='',
...
1
vote
0answers
19 views
SQlachemy setup models of tables that are on different databases
I have two table (ta, tb) that ta is on database DA and tb is on database DB .
If I would use raw sql I would like to do a query like:
SELECT `da`.`ta`.x, `db`.`tb`.y FROM `da`.`ta`.x, `db`.`tb`.y
...
1
vote
0answers
53 views
CPU spikes on PDF render in PyQt and then freezes
At one point, my application queries the MySQL database, and fetches 300 rows with this code:
cur.execute('''
select
ime, brPredmeta, statusStr, sudskiBr, sudija,
...
1
vote
0answers
89 views
sqlalchemy multi-session commit fails silently, how to change INSERT to UPDATE
I have a Event model, where external_id is set to be unique.
session1 = create_session()
session2 = create_session()
e1 = Event(external_id=1, headline='session1')
session1.add(e1)
...
1
vote
0answers
138 views
django python randomly raise mysql operational error and redis “too many open files” error
I have a web service built with python+django+fastcgi(flup)+mysql+redis.
But it always occasionally raises some exception,
e.g. OperationalError: (2001, "Can't create UNIX socket (24)") or
...
1
vote
0answers
75 views
Creating value historic API logic
The question below boils down to:
collection = {}
for car in Car.objects.all():
unique_comb_id = str(car.brand_id)+'_'+str(car.year)
if not collection.get(unique_comb_id):
...
1
vote
0answers
130 views
MySql insert statment is giving Error 1064: exited abnormally with signal 11: Segmentation fault: 11
I am trying to insert data into a mySql database using a python script. When I run the python script I receive the following error:
Error 1064: You have an error in your SQL syntax; check the manual ...
1
vote
0answers
185 views
How to configure webpy and MySQL on OpenShift
I want to know how to deploy webpy to-do example on openshift. Here is an official webpy example showing how to deploy a webpy app on openshift, but this example does not deal with mysql. Can anyone ...