Tagged Questions
0
votes
1answer
11 views
How to import existing MySQL database into web2py?
I am working on a project which requires that I import an already existing database and use it's data in Web2py. I have been able to link to the database by changing the DAL URI to:
db = ...
0
votes
0answers
17 views
Mysql join query works in Mysql Workbench, but hangs at PyDev
I have been trying to run this query in PyDev environment for a while, but it just hangs there.
The tables involved are large (tweets around 700,000 and user about 400,000). I have all the indexes ...
0
votes
1answer
13 views
SqlAlchemy connection string [duplicate]
I faced very strange issue - my solution using sqlalchemy cannot connects to database. It depends on password I am using. for example, following records are working perfect:
PWD='123123123'
...
1
vote
1answer
25 views
Connect to old mysql installation using python-mysql,
I'm trying to connect to database built in into a physical device, and I don't want to change any configuration of this mysql server.
When I try to connect i get following error:
Traceback (most ...
1
vote
1answer
29 views
128 bit Integer hash function
Looking for a string to integer hash function with values in the range of mysql bigint unsigned datatype (0 <= n <= 18446744073709551615). Converting md5/sha1 to integer with the base of 16 does ...
0
votes
2answers
17 views
python StringBuilder for MySQL query execution
I am trying to query my database where one of the columns is a python variable:
weekNum = "week" + str(i) #i is either 2, 3, 4, 5
cur.execute("select %s from golden_table where nGram = ...
0
votes
2answers
32 views
MySQL syntax error in python but working in MySQL shell
I am using MySQLdb in python
I have a table let table1 with 4 fields one is index which is PRIMARY KEY and suppose others are field2, field3, field4. Since field2 is not unique, I have many rows with ...
0
votes
0answers
17 views
mysql python read and write efficiency
I am running a python program that reads one MySQL table, and then creates another MySQL table. For some reason, this is taking longer on a more powerful machine. On a much slower computer it was ...
1
vote
1answer
24 views
PyMysql UPDATE query
I've been trying using PyMysql and so far everything i did worked (Select/insert) but when i try to update it just doesn't work, no errors no nothing, just doesn't do anything.
import pymysql
...
3
votes
3answers
21 views
Filter python mysql result
I am running a mysql query from python using mysql.connector library as per code below
cnx = mysql.connector.connect(host=mysql_localhost, user=user, password=password, database=database)
cursor = ...
0
votes
1answer
35 views
django imporperly entering datetime into database
In my Django App I have a view that submit data to the database for my Task Model. One of those fields includes a time. Whenever I submit that data and then read it back out into my app it looks ...
2
votes
1answer
17 views
MySQLdb error 1130: Not getting the correct IP of the server [duplicate]
I'm trying to connect to mysqldb through a python script. I have changed the bind-address in my.cnf to '192.168.56.101' which is my server ip.
import MySQLdb
db = ...
1
vote
2answers
28 views
Finding matches in Django model without punctuation or spaces
I'm trying to match a string that is a GET from the URL, to a field in the database that is the same string without any punctuation or spaces. For example:
URL: http://www.mysite.com/JohnBSmith/
And ...
0
votes
2answers
20 views
Extracting ip address from mysql query list using python
I would like to extract an ip address from mysql using python.
here is my code,
cnx = mysql.connector.connect(host=mysql_localhost, user=user, password=password, database=database)
cursor = ...
2
votes
3answers
17 views
Filter out values from python mysql query
I am using mysql.connector in python to get a list of values from a database.
can you please help extract each value from the list separately
my code is as below
cnx = ...