mysql

Why do the Vertrigo 2.21 (MySQL server do not start) do not work under Windows 7 ?

It says that port 3306 might be busy - i have changed it (Settings>Components Settings) but just nothing? VertrigoServ → MySQL database server does not work correctly. Check whether other applications use the important port (3306) and terminate them. Moreover, check firewall settings and correctness the configuration files....

mysql insert performance

Our DB has very bad insert and update performance. Most of the big tables take 2-3 seconds per insert. If we rebuild the table, time reduces to 0.02-0.03 which means about 40 inserts per second. Even that is pretty low, and we cannot afford to rebuild tables every now and then. It is a time-consuming process and locks the table for the d...

rails/mysql - how do i silence out ActiveRecord::StatementInvalid error?

i am writing a code to handle read/unread messages, with a simple user_id/message_id mysql table to handle read/unread status. when the user views the message, i execute Reading.create(:user_id => uid, :message_id => mid) there is unique index on user_id/message_id fields combination, so when the entry in Readings already exists, i g...

Nhibernate Guid with PK MySQL

Hello colleagues. I've got a question. I use NHibernate with MySql. At my entities I use Id(PK) for my business-logic usage and Guid(for replication). So my BaseDomain: public class BaseDomain { public virtual int Id { get; set; } public virtual Guid Guid { get; set; } public class Properties { public const str...

Does the MySQLdb module support prepared statements ?

Does MySQLdb support server-side prepared statements? I can't figure this out from its manual. ...

MediaWiki: how to hide users from the user list?

I've set up Mediawiki 1.15.1 for a client who has added two users by mistake. They now want to hide these users from the user list. It seems this is done via the $wgGroupPermissions array with $wgGroupPermissions['suppress']['hideuser'] = true;, but it isn't at all clear what entry this needs for the hiding to work, or whether a new gro...

MySQL Search (Sort by Relevance)

Hi guys, Can any one help me how to sort rows by relevance for the following criterion ? `tbluser` - - - - - - - First Name Last Name `tbleduc` - - - - - - - School College University On the search form the user has following fields Name School College University Where School College and University are Optional.. And Name is spl...

How to make the default engine to be innodb in MySQL?(BATCH)

I need to create dozens of tables,and I need them to be innodb, is there an way to do this instead of appending engine=innodb to each of the create table statement? ...

Saving commands for later re-use in MySQL?

What would be the equivalant in MySQL for: Saving a command for later reuse. eg: alias command1='select count(*) from sometable;' Where then I simply type command 1 to get the count for SomeTable. Saving just a string, or rather part of a command. eg: select * from sometable where $complex_where_logic$ order by attr1 desc; WHere $co...

how to get the table of missing rows in mysql

i have two mysql tables tableA colA1 colA2 1 whatever 2 whatever 3 whatever 4 whatever 5 whatever 6 whatever second table is basically derived from tableA but has some rows deleted tableB colB1 colB2 1 whatever 2 whatever 4 whatever 6 whatever how can i write an q...

Cannot store value into database

when i submit the form.. the form display the 'error' msg that mean the query does'nt work.. i've compare the code with the other code and it seem similar... i dont know what to do with this.. please guys... help me... (here's is the form code) <?php if(isset($_GET['bookno'])) $bookingno = $_GET['bookno']; elseif(isset($_PO...

C++ with fstream or database

Hey guys, I am trying to implement a image recognition program in C++. I had completed the extracted of feature, now trying to save the large amount of numbers. I had 2 implementation in mind, one is to save the data into binary files, to reduce the overhead of computation, or i can use database to keep the information. Binary file is fa...

Java + MySQL or LDAP Server Status

How can I check from Java is MySQL / LDAP is running or not? ...

Django deployment. Error loading MySQLdb module. Trouble reading/writing from /tmp directory

I'm deploying my Django app to another host/server using mod_wsgi and MySQLdb. Right now, I'm getting a 500 error with the following log: ImproperlyConfigured: Error loading MySQLdb module: /tmp/MySQL_python-1.2.3c1-py2.4-linux-i686.egg-tmp/_mysql.so: failed to map segment from shared object: Operation not permitted Did some research a...

INSERT INTO error in MySQL

Notice: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usage VALUES('16','143','ew','weff','25-3-2010','8.00 AM','22-3-2010','10.00 AM'' at line 1 in: INSERT INTO usage VALUES('16' ,'143' ,'ew' ,'weff' ,'2...

MySQL: Indexing large amount of columns with varied queries

Hey guys.... I really hope someone can help me here as I can't seem to get an answer anywhere :( Basically I'm working on a large table so indexes are pretty important, but it's basically a table that has several different fields that are searchable..... so the way the columns are queried has probably 100's of different variations, so c...

Compare DB row values efficiently

I want to loop through a database of documents and calculate a pairwise comparison score. A simplistic, naive method would nest a loop within another loop. This would result in the program comparing documents twice and also comparing each document to itself. Is there a name for the algorithm for doing this task efficiently? Is there ...

In mysql or postgres, is there a limit to the size of an IN (1,2,n) statement?

I've got quite a few SQL statements like such: SELECT foo FROM things WHERE user_id IN (1,2,3..n) Is there a known limit to the number of elements that will safely fit in an IN clause like that? ...

PDO: Transactions don't roll back?

I am going through this tutorial about PDO and have come to the point about transactions. Skipping the connection parts, I have this php code: try { $db->beginTransaction(); $db->exec('DROP TABLE IF EXISTS animals'); $db->exec('CREATE TABLE animals (' .'animal_id MEDIUMINT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,' ...

MySQL Lookup table and id/keys

Hoping someone can shed some light on this: Do lookup tables need their own ID? For example, say I have: Table users: user_id, username Table categories: category_id, category_name Table users_categories: user_id, category_id Would each row in "users_categories" need an additional ID field? What would the primary key of said table...