I set up MySQLdb-1.22 and MySQL 5.0 to hopefully create a database containing pixel values to make it easier to examine behavior across datasets. Here is how to start/stop it: #To start the mysqld server: cd /u2/ki/software/mysql-5.0.45-linux-i686-icc-glibc23/ ./bin/mysqld_safe #To stop the server mysqladmin shutdown -u root -p Enter password: mysql Here are the commands that I used to configure mysql SELECT Host, User FROM mysql.user; UPDATE mysql.user SET Password = PASSWORD('mysql') WHERE User = 'root'; #To list the users and their passwords SELECT Host, User, Password from mysql.user; #To add a new user with administrative privileges Grant ALL PRIVILEGES ON *.* TO 'lances'@'ki-rh31' IDENTIFIED BY 'mysql' with grant option; #To ################################################ #TO CHANGE DIRECTORY WHERE DATA IS STORED #Go to the configuration file my.cnf vi /etc/my.cnf #add the following line under [mysqld] datadir=/nfs/slac/g/ki/ki03/lances/MySQL/data #then shutdown the server mysqladmin -u root -p shutdown #and start it back up cd /u2/ki/software/mysql-5.0.45-linux-i686-icc-glibc23 ./bin/mysqld_safe #FLUSH PRIVILEGES; Here are some useful commands mysqladmin variables -u root -p | more #TO REMOVE A DATABASE: mysql> drop database FE55; where FE55 is the name of the database #TO SELECT FIRST 10 ROWS IN A TABLE select * from H2RG_32_147_ASIC_FE55HITS LIMIT 0,4; #TO SELECT FIRST 10 ROWS AND ALSO SEE HOW MANY TOTAL MATCHES YOU HAD: select SQL_CALC_FOUND_ROWS * from H2RG_32_147_ASIC_FE55HITS LIMIT 0,4; select found_rows(); #TO COPY A TABLE: create table Test select * from Saturation_5Reads_I; #To delete rows from a table delete from NGC2395_DarksAfter_5Reads_Y where PixID=3165445; #TO SELECT FROM MULTIPLE TABLES BASED UPON A SINGLE KEY select * from DarksAfter_5Reads_I, Saturation_5Reads_I where DarksAfter_5Reads_I.PixID = 231676 and Saturation_5Reads_I.PIXID=231676; #To figure out how many rows would be returned by a query select count(*) from H2RG_001_ASIC_Window_Gain4_Fe55; mysql> select COUNT(*) from H2RG_32_147_ASIC_VBELynVBELyn where WINDOWNUM=0 ; +----------+ | COUNT(*) | +----------+ | 55000 | +----------+