Skip to main content.
May 16th, 2008

Enabling Stubborn InnoDB Tables in MySQL on Ubuntu

So I’m on Ubuntu 8.04 64bit and MySQL 5.0.51a. Today I decided I wanted to use InnoDB tables. But MySQL Administrator told me that InnoDB is not enabled currently.

So I first went into /etc/mysql/my.cnf and removed the skip-innodb variable, and added a few other performance oriented settings for using InnoDB tables and restarted MySQL. But alas it still wouldn’t work.

When I tried to create a table MySQL told me “Warning: Using storage engine MyISAM for table …”

and my log had all of this weird stuff in it:

mysqld[22162]: 080516 13:30:21 [Warning] Changed limits: max_open_files: 1024  max_connections: 100  table_cache: 457
mysqld[22162]: InnoDB: Error: data file /var/lib/mysql/ibdata1 is of a different size
mysqld[22162]: InnoDB: 640 pages (rounded down to MB)
mysqld[22162]: InnoDB: than specified in the .cnf file 128000 pages!
mysqld[22162]: InnoDB: Could not open or create data files.
mysqld[22162]: InnoDB: If you tried to add new data files, and it failed here,
mysqld[22162]: InnoDB: you should now edit innodb_data_file_path in my.cnf back
mysqld[22162]: InnoDB: to what it was, and remove the new ibdata files InnoDB created
mysqld[22162]: InnoDB: in this failed attempt. InnoDB only wrote those files full of
mysqld[22162]: InnoDB: zeros, but did not yet use them in any way. But be careful: do not
mysqld[22162]: InnoDB: remove old data files which contain your precious data!

So I tried restarting MySQL again and saw these weird log messages:

mysqld[22396]: 080516 13:37:19 [Warning] Changed limits: max_open_files: 1024  max_connections: 100  table_cache: 457
mysqld[22396]: InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes
mysqld[22396]: InnoDB: than specified in the .cnf file 0 524288000 bytes!

Finally out of desperation I tried following the advice in the log files above “… and remove the new ibdata files InnoDB created in this failed attempt”.

So I went into /var/lib/mysql and deleted these three files: ibdata1, ib_logfile0, and ib_logfile1. Then I restarted MySQL. It failed to start :-( but I restarted again and everything worked!

Yay! I can now use InnoDB files like a professional.

Posted by Greg Pinero (Primary Searcher) as Ubuntu, SQL at 1:28 PM MST

No Comments »

May 6th, 2008

Linux - How to Kill an Uninterruptible Process

sudo kill -STOP [PID]

worked for me. I’m not sure why.

Posted by Greg Pinero (Primary Searcher) as Ubuntu at 9:45 AM MST

No Comments »

April 29th, 2008

Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

How to get a Windows UNC path of a file on a Mapped drive
If you’re just doing this manually, I recommend installing this path copy utility, it will let you right click on a file and get its UNC (network) path.

How to move iTunes to a new computer (preserving playlists, etc)

Cool Date Picker JS (Timeframe)
Still needs IE support, but might be good someday

On-line PDF form Filler, Editor, Type on PDF ; Fill, Print, Email, Fax and Export
Actually fill out a PDF form on a computer.

The Blog Authorship Corpus
The Blog Authorship Corpus consists of the collected posts of 19,320 bloggers gathered from blogger.com in August 2004. The corpus incorporates a total of 681,288 posts and over 140 million words - or approximately 35 posts and 7250 words per person.

pyExcelerator (xlwt) cheatsheet (create native Excel from pure python)
xlwt looks like a better alternative than pyExcelerator. This guy even gives us a cheetsheat (i.e. ANY documentation)

The Linux Newbie: Installing a WiFi (Wireless) Card in Kubuntu: Using ndisgtk and ndiswrapper
Perhaps try ndisgtk next time you need a weird driver for Ubuntu? It’s supposed to be an easy to use wrapper around the utlra-complicated ndis whatever thingy …

Tags: , , , , , , , , , , , , , , , , , , , , , ,

Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST

No Comments »

April 25th, 2008

How to Restart MySQL in Ubuntu

sudo /etc/init.d/mysql restart

Posted by Greg Pinero (Primary Searcher) as Ubuntu, SQL at 10:11 AM MST

No Comments »

April 24th, 2008

How to Show Empty Table Cells in IE and Firefox

Just use something like this in your CSS styes:

table {
empty-cells:show;
border-collapse:collapse;
}

empty-cells works in Firefox, and border-collapse unintuitively works in IE to not collapse the cells.

Posted by Greg Pinero (Primary Searcher) as Other at 1:56 PM MST

No Comments »

« Previous Entries