Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
« Sick | Main | Damn »

F3 Kills XP

Here's a good one for you. I've been trying to hack my register on Windows XP to enable InnoDB tables in MySQL (which doesn't seem to be working). When I hit F3 to search for the next instance of "mysqld-nt.exe" - it kills my machine. The screen just goes dark and seemingly shuts down (though the power light is still on). If I press the power button, it'll power off fully. Of course, pressing it again powers it back on again. Wierd - guess it's time to switch to OS X for the day.

Thinking out loud: Maybe I should switch AppFuse to using PostgreSQL by default so users don't have to jump through hoops to get transactional tables.

Posted in Java at Sep 22 2004, 12:51:15 PM MDT 20 Comments
Comments:

Matt, I have it running on my laptop. Drop me an email if you want to know the setting I used to enable innodb on windows. Steve

Posted by Steven Citron-Pousty on September 22, 2004 at 07:19 PM MDT #

One other quick note, if you are going to go with postgresql wait for version 8. This version will have a native windows of the RDBMS.

Posted by Steven Citron-Pousty on September 22, 2004 at 07:20 PM MDT #

You've got me interested Steve, please post your configuration. As for PostgreSQL, if I do decide to switch, I'll probably wait until 8.0 is released. The Windows Installer is very nice.

Posted by Matt Raible on September 22, 2004 at 08:09 PM MDT #

!Hey Matt: I am using MySQL 4.0.x which by default includes MySQL-Max. Here is my config file: {{{ [mysqld] basedir=C:/mysql #bind-address=10.202.54.174 datadir=C:/mysql/data #language=C:/mysql/share/your language directory #slow query log#= #tmpdir#= #port=3306 #set-variable=key_buffer=16M }}} which is in my.ini in the C:\windows directory. You will notice it contains nothing about innodb there. The only thing you need to do is change your DDL. At the end of the table creation statement add... ENGINE = InnoDB; Here is an example table creation statement: {{{ create table quadWorkers ( quad_id CHAR(15) not null, INDEX quadidq(quad_id), people_id VARCHAR(254), INDEX peopleidq(people_id), dateEntered TIMESTAMP null, leadSurveyor BIT null, itemsSent VARCHAR(254), dateSent DATE) ENGINE = InnoDB;}}} This should work for you... Steve

Posted by Steven Citron-Pousty on September 22, 2004 at 08:28 PM MDT #

!Yeah, I knew about adding the Type=InnoDB, but I'm using Hibernate's <schemaexport> task to generate my database schema. According to the Hibernate FAQ, starting your database with the setting below is the easiest way to enable InnoDB by default. {{{--default-table-type=InnoDB}}}

Posted by Matt Raible on September 22, 2004 at 08:41 PM MDT #

Yes, XP is very stable (harhar). That's why I'm using it all the time (once a year). I'd give Postgres a try, I'm using MySQL for testing at the moment and I have a lot of problems I didn't have before. And Postgres is free.

Posted by Lars Fischer on September 22, 2004 at 08:55 PM MDT #

FWIW, InnoDB tables are enabled by default in MySQL 4.x:

http://dev.mysql.com/doc/mysql/en/InnoDB_configuration.html

I do not have any knowledge of either database running on Windoze, I'm a Linux/Unix guy ;-). I had switched the Castor Live sample app over to PostreSQL specifically because of the transaction support. But when I read about MySQL offering InnoDB out of the box with 4.x, I decided that I should offer support for both eventually. I'm even thinking about adding support for HSQL because I can start it up easily from Ant.

Posted by Bruce Snyder on September 22, 2004 at 10:33 PM MDT #

Thanks Bruce - I actually saw this page. Unfortunately, InnoDB is just <em>enabled</em> - it's not actually used as the default. IMO, the main shortcoming of PostgreSQL to date is ease-of-install on Windows, but with the 8.0 installer - that's likely to change. HSQL is cool - I used it for the first half of Spring Live, then switched to MySQL in Chapter 7. In Chapter 10 (Transactions) - I'll probably switch to PostgreSQL.

Posted by Matt Raible on September 23, 2004 at 04:00 AM MDT #

!First let me use an oportunity to say HUGE thanks to all your work on AppFuse - I used it to start working on Java web applications and learned so much from it. Really, before I found AppFuse I was so confused getting in the web application world from client server applications (and I do have quite a bit of programming experience). Most of it with all the patterns, etc is such a big mess for "normal" programmer like me (think PetStore) ... :-) Back to the topic - I am using an ant replaceregexp to add ENGINE=InnoDb in db-schema-export task, but this probably is is not a good solution to stay "cross database"... {{{ <replaceregexp flags="g" file="metadata/sql/db-schema.sql" match='^\);' replace='\) ENGINE=InnoDB CHARACTER SET UTF8;' byline="true" /> }}} I also ended up breaking up db-schema.sql in to 2 files - one containing schema and the second - foreign keys - makes it easier to import interrelated test data. I would recommend against switching to Postgress - Mysql is more appropriate for "learning/starting point" type of application AppFuse is. And even if users do not get transaction/foreign key support (InnoDB tables), they do not really care at that point, I think When I was looking for starting point any "non standard" app component scared me off - I had sufficient trouble grasping concepts and how the things work. And at that point of course I did not know/believe that everything specific to database is hidden in hybernate...

Posted by Girts Ziemelis on September 23, 2004 at 06:08 AM MDT #

For all databases I can recommend Data Studio (http://www.aquafold.com). It's escpecially nice when working with multiple databases (Oracle, MSSQL, MySQL, PostgreSQL, etc).

Posted by Lars Fischer on September 23, 2004 at 07:57 AM MDT #

Matt, you might want to check out the new installer that's coming with MySQL-4.1.5. During the installation (or even post installation), there's a wizard that asks what kind of configuration you want to use. If you choose the "Transactional Database Only" option, it will automatically configure MySQL to use InnoDB as the default. See http://dev.mysql.com/tech-resources/articles/4.1/installer.html for an overview of the new installer, and http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.5-gamma-win.zip/from/pick for the download. Hopefully that will end your quest for a registry hack to enable the service. (btw, you could've registered the MySQL service with the option --default-table-type=InnoDB , and avoided the registry altogether, I believe).

Posted by Mark Matthews on September 23, 2004 at 09:52 AM MDT #

Matt, my 5 cents: To keep AppFuse as open as possible, go for PostgreSQL! Migrating from MySQL to another DB can be a real pain in the ass for all its deviations from standard SQL. We had to migrate several MySQL-backed apps to Oracle and PostgreSQL - never again!

Posted by Wolfgang Wopperer on September 23, 2004 at 10:28 AM MDT #

Just as an FYI... AppFuse currently runs on most databases: MySQL, PostgreSQL, Oracle, DB2, HSQL - you just have to change a few properties in build.properties. Currently MySQL is the default and I'm merely thinking about changing that to PostgreSQL. It wouldn't be hard, I'd only have to change 5-7 lines of code. The hard part would be supporting users running PostgreSQL. I know MySQL from years of experience and I've only worked with PostgreSQL off and on over the last year.

Posted by Matt Raible on September 23, 2004 at 10:46 AM MDT #

Matt, You saw the light twice in one day :-) First switching back to OS X for the day, then making Postgresql the default for App Fuse, Alleluia! With the upcoming native windows rev of Postgresql, I think MySQL will take some good hits to its user base. R

Posted by Robert S. Sfeir on September 23, 2004 at 11:23 AM MDT #

+1 for the free java db client Aqua data studio. Also, while Matt's pc may have a faster cpu, inevitably he is more productive on the powerbook :) Just think how productive he would be with a G5 Tower...

Posted by Ted on September 23, 2004 at 09:30 PM MDT #

Hi Matt, Is as easy as adding default-table-type to windows/my.ini. Any command line option can be added to my.ini
[mysqld]
default-table-type=InnoDB
More info here. The only problems I had migrating from mysql to postgres were the reserved words, mysql accepts most of them but postgres not (e.g. columns called start, table called user,...)

Posted by Carlos Sanchez on September 24, 2004 at 07:57 AM MDT #

[Trackback] If you want to use transactions (trust me, you want) you have to use InnoDB tables, so add default-table-type=InnoDB to your mysql configuration file (my.cnf or my.ini). This solution is Hibernate friendly. For example in windows you can use the follow...

Posted by Carlos Sanchez's Weblog on September 24, 2004 at 08:07 AM MDT #

Yes Yes... PostgreSQL is the way to go. It's got and has had for a long time, the Enterprise features one would want... pgAdmin3 looks just the same on Win or Linux and pgAdmin2 has migration wizards that can pull you from a proprietary DB (even ACCESS) to OSS Freedom with ease.

Posted by Chump on September 24, 2004 at 03:49 PM MDT #

Hi Matt, did you have a look at MaxDB by MySQL? It's certainly worth considering if you talk about switching to PostgreSQL... Regards Juergen

Posted by Juergen on September 27, 2004 at 03:24 PM MDT #

Matt, FWIW, I use MySQL on XP, and I have to use a different binary to get InnoDB support. The nice "MySQL Administrator" tool sets the "Path to binary" property to "C:\mysql\bin\mysqld-max-nt" when I check the "Support for InnoDB" check box. That's the "Windows" way to do it, at least. Basically, the mysqld-nt.exe doesn't have BDB or InnoDB support linked in, but the mysqld-max-nt.exe does.

Posted by Kevin Williams on October 06, 2004 at 04:27 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed