MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Microsoft XP’ Category

CrossOver Plus Limits

without comments

While reconfiguring my iMac, it was interesting to note the bumpy road to implementing Code Weaver’s CrossOver Plus 8.0.1 for the whole Microsoft Office Suite. Previously, it had only been used to support Microsoft Visio 2007.

I discovered that a Shutdown and Start operation was required after installing CrossOver Plus because a Restart hadn’t worked. Attempting to create the WINE bottle with a reboot gave me the following error:

The Microsoft Office 2007 package requires CrossOver HTML engine to install and
run properly. Continuing with the install may produce unpredictable results.

I also found that patching the Office product failed. It’s possible that could be the network here, but there’s also no manual way to download *.msi files and apply them against the WINE bottle. It’s possible that a trick was missed and there is a way to do it. Downloading and right clicking on the *.msi file on the Mac OS X side allows you to look for an application to help but I couldn’t find a helper application in the CrossOver Plus folder tree. It may be there, however, where it is eluded me in the time my patience would allow (please comment if you know its location)?

Rather than use Google Quick Search Box I thought symbolic links would be helpful in the Applications folder since I actually also run Microsoft Office 2008. Turning to Chapter 6 in the product documentation didn’t solve the problem. It led me to an incorrect folder location.

They’re not here, as stated in the product documentation:

You can find them in the WINE bottle folders here, the default is for Windows XP:

Within the Bottle folder, you can find the Microsoft Office 2007 links here:

General Complaint

The CrossOver Plus installation suppresses the options dialog to choose a typical, full, or custom installation of Microsoft Office 2007. That means you get typical, which means you can’t connect to a remote database using the JDBC et cetera. This doesn’t meet my needs and means I’ll have to put another VMWare instance together to work with Microsoft Excel 2007 reasonably. Drat!

Written by maclochlainn

December 23rd, 2009 at 1:03 pm

Black Screen of Death

without comments

Holiday Gift from Microsoft

Windows 7 ships. Then, we find it’s really Windows Vista+ (code base 6.1). Now, Microsoft give us a late year present, the Microsoft Black Screen of Death (their original post has been wiped by agreement with Microsoft it appears but only the shadow knows and rumors on the web). What better excuse to rush out and buy a MacBook Pro or use this fix?

Holiday Gift from Apple

Buying a MacBook Pro makes sense if you don’t already have one. Owning one, I’m hesitant to upgrade my MacBook Pro because the battery in the new one requires a service call when the battery wears out. An expensive item because the battery life is generally poor after 1,000 recharge cycles and that number of recharges may or may not occur before your Applecare service contract runs out.

Battery life/replacement is one of the reasons why I’ve stayed on my old MacBook Pro (purchased 16 months ago). The other reason is that I plan on getting by with a MacBook Pro for 4 to 5 years not Apple’s apparent plannned obsolescence of 3 years. While I’m in the gripe mode, the new Apple Cinema Display is attractive but not compatible with older MacBook Pro or MacBook computers. Also, the Altona DVI to Mini Display Port has mixed reviews out there and Apple seems disinterested in helping owners of older machines use the new Cinema screens. There aren’t any other alternatives to the Altona product (at least that I’ve found). I almost feel that somebody at Apple watched the movie Robots too often because it seems my 16 month old MacBook Pro is an outmode and there isn’t an upgrade option (only a new purchase).

Written by maclochlainn

December 1st, 2009 at 1:27 pm

Hiding MySQL Password

with one comment

I always tell my students how to protect their Oracle credentials but hesitated to do the same for MySQL because it involves Windows batch shell scripting (albeit simple one line scripting). Oracle is nice and clean about hiding credentials. If you only provide the USER name at the command prompt, then your PASSWORD is never displayed. Only the user name is displayed in the DOS command prompt session’s window frame. You do that in Oracle with a student user name, as follows:

C:\Data\Oracle> sqlplus student
SQL*Plus: Release - Production on Mon Sep 21 09:20:25 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Enter password:

MySQL isn’t quite so convenient as a command-line tool. You must enter the -u or --user followed by the user name and -p or --password followed by the password when connecting to the database. For example, this shows a typical command prompt window frame:


As noted by Stephen in his comment, you can also mimic Oracle by using the following syntax:

C:\Data\MySQL> mysql -ustudent -p
Enter password:

Unless you use that syntax, anybody walking up can see your USER and PASSWORD in clear text. Not exactly the best security practice, eh? You can also suppress the USER name from displaying by writing a small batch file with your text editor or at the command-line, like this:

C:\Data\MySQL>COPY CON mysqlcmd.bat
@mysql -ustudent -p

While you’ll need to enter your password because you really don’t want to store that in a file. The @ symbol suppresses echo of the command, which means you won’t display your USER name or PASSWORD when you start the mysql client tool. It will only display the batch file name and the welcome message:


Hope this helps you when you’re working at the MySQL command-line. However, I’m often stunned by how few use it. They prefer phpMyAdmin or Quest’s Toad for MySQL.

Written by maclochlainn

September 20th, 2009 at 8:55 pm

Watch the Event Logs

with 4 comments

It’s the end of our Spring term, and yes occasionally somebody can’t sign on to their Oracle instance because their event log is full. They get the following message on Winodws:

C:\>sqlplus / AS sysdba
SQL*Plus: Release - Production ON Wed Jul 15 10:19:37 2009
Copyright (c) 1982, 2008, Oracle.  ALL rights reserved.
Enter password:
ORA-28056: Writing audit records TO Windows Event Log failed

The fix is simple, just delete your items from your Windows’ event log. 😉

Written by maclochlainn

July 15th, 2009 at 4:46 pm

Toad for MySQL Freeware

without comments

While SQL Developer is a nice tool and free, Toad is still an awesome development platform, albeit for Windows. In fact, it was annoying to have to install the Microsoft .NET Framework before installing it. It is free for MySQL!

Since my students have to do all their work in Oracle and then port it to MySQL, I demonstrate Quest’s Toad for MySQL’s at the end of the term. I don’t want them to leverage the automatic ERD diagramming while they’re learning how to do it.

There’s only one real trick to making automatic ERD diagramming work. That trick requires that you write your loading scripts for the Inno DB and use referential integrity constraints. My sample Video Store scripts for my database class are updated for MySQL referential integrity.


Unlike the friendly CASCADE CONSTRAINTS clause you can use in Oracle, MySQL won’t let you create a re-runnable script with only DDL statements. Actually, the constraint comes from the InnoDB engine. You must issue a specialized InnoDB command before running your script:

-- This enables dropping tables with foreign key dependencies.
-- It is specific to the InnoDB Engine.

Primary keys are a bit different from Oracle and it appears you can’t name them, at least I couldn’t see how to do it. Here’s an example of primary and foreign key constraints in MySQL. The primary key is inline and the foreign key constraints are out of line. This example from the downloadable scripts uses self referencing foreign key constraints.

CREATE TABLE system_user
( system_user_id              INT UNSIGNED PRIMARY KEY AUTO_INCREMENT
, system_user_name            CHAR(20)     NOT NULL
, system_user_group_id        INT UNSIGNED NOT NULL
, system_user_type            INT UNSIGNED NOT NULL
, first_name                  CHAR(20)
, middle_name                 CHAR(20)
, last_name                   CHAR(20)
, created_by                  INT UNSIGNED NOT NULL
, creation_date               DATE         NOT NULL
, last_updated_by             INT UNSIGNED NOT NULL
, last_update_date            DATE         NOT NULL
, KEY system_user_fk1 (created_by)
, CONSTRAINT system_user_fk1 FOREIGN KEY (created_by)
  REFERENCES system_user (system_user_id)
, KEY system_user_fk2 (last_updated_by)
, CONSTRAINT system_user_fk2 FOREIGN KEY (last_updated_by)
  REFERENCES system_user (system_user_id)

Once installed (instructions are here) and connected to the MySQL database, you simply click the ERD icon in the top panel and drag the tables onto the canvas. You’ll see something like this (by the way click on the image to see its full size):


Have fun with it. It’ll be interesting to see how Oracle positions MySQL when they own it. My hunch is that they’ll continue to sell it and provide it as an open source product.

Written by maclochlainn

July 11th, 2009 at 5:03 pm

Zend Java Bridge 32-bit

with 2 comments

I just wanted to see how Zend Server Community Edition might be broken. Performing a full feature install on Windows x64, I confirmed that Zend Server’s Java Bridge depends on the 32-bit JRE (common sense prevails). Installing it against the JRE 64-bit jvm.dll did raised an exception but none of the instructions address the problem.

It’s one of those simplifying assumptions – everybody knows 32-bit software works with 32-bit software. Anybody running on Windows XP x64 should know that they may need a JDK 64-bit and both a JRE 64-bit and JRE 32-bit for some applications. For those who don’t know this, like my students and other newbies, when you run Windows XP the 64-bit stuff goes in the C:\Program Files directory and the 32-bit stuff goes in the C:\Program Files (x86) directory. This lets you develop 32-bit or 64-bit Java applications on the same 64-bit machine.


Another tidbit of interest, don’t choose a full install if you’ve already installed MySQL. The Zend Community Server isn’t smart enough to alter the configuration to another port, and their my.ini points to a 3306 listener port. This causes the MySQL_ZendServer51 service to fail. It also doesn’t uninstall well. If you don’t want to clean the Windows Registry, don’t choose to install a second MySQL.

As an FYI, the Zend installation of MySQL doesn’t put a password on the root account. Don’t forget to add one after the install if you go down the full product road. This has the Zend Server Community Edition installation instructions.

Written by maclochlainn

July 7th, 2009 at 9:39 pm

Configuring Zend Server

with 2 comments

I got all the screen shots out last night, then I realized that the configuration instructions were missing. They’ve been added now, and you can check if you’re interested.

In the process, I noticed that Zend Server Community Edition is using connection pooling by default with Oracle. This means that the TNS alias must be qualified by a hostname.

For example, on your local PC with Oracle Database 10g Express Edition, the default TNS alias is XE. You can’t use that anymore when you’re running the Zend Server. You must qualify it as localhost/XE or hostname/XE as the connection string. A natural alternative is to insert a fully qualified TNS network map

Here are three possible connection patterns:

I’m sure it was in the documents but then again, I didn’t read them. 😉

Written by maclochlainn

July 2nd, 2009 at 11:39 pm

Reluctant Print Sharing

with one comment

About 8 months ago I published how to set up a shared network printer in Windows XP, using VMWare Fusion on a Mac OS X. Recently, I went to follow my own instructions and found they failed with an older Windows XP media – OUCH!

When I checked whether or not the version of Windows XP knew about my much newer printer, the problem became clear. If you want to set up a newer printer than Windows recognizes, you’ll need the vendors media.

Here are the steps to install a printer when Windows can’t recognize the network printer:

1. First make sure you navigate to Virtual Machine on the VMWare Fusion menu, choose CD/DVD and then Connect CD/DVD to proceed.


2. Insert the disk that came with your printer. My disk is for my HP 2420 duplex printer on Windows XP, 32-bit. If you’re installing to a 64-bit version of Windows, the installer will die and the complexity rises as you download the media from HP and manually install the driver files.

The screen shots are those for configuring a printer because I neglected to capture the driver install shots earlier and didn’t have the time to do so. When I have to setup another similar version, I’ll add those. The first screen shot after the welcome screen and choosing your language follows. Click the Next button to continue.


3. Choose the Add an additional printer on printer driver radio button, then click the Next button to proceed.


4. Choose the Connected via the network radio button, and then click the Next button to continue.


5. Choose the Basic network setup for a PC or server (recommended) radio button, and then click Next button to continue.


6. Choose a method to search by enabling the Search from a list of detected printers (recommended). This choice fails from the normal process that adds a printer because it can’t detect newer printers. Click the Next button to continue.


7. This next screen is a progress bar, and it takes enough time that you’ll notice it. Click the Next button to continue.


8. Hopefully, you’ll find your printer. Click the Yes, install this printer. Click the Next button to continue.


9. The following confirms the settings. Unless you’ve manually assigned the Network Interface Card for the printer to a fixed IP address, I’d leave these settings alone. Click the Next button to continue.


10. If you’ve manually installed the Post Script driver you may want to enable it here. As to the HP LaserJet Toolbox, I would definitely leave it alone. Click the Next button to continue.


11. This is where you can rename your printer if you have a desired name. Enter any change from the default, and then click Next to continue.


12. Generally, it’s a very bad idea to share a printer from a virtual machine instance. The only time I’d even think about it would be if I were trying to replicate a problem with a nested virtual machine. Therefore, I’d suggest you choose Not Shared, and then click Next to continue.


13. Here you can put a location in for the printer and any comment you’d like to have for it. Click the Next button to continue.


14. Everything to here as been choosing the configuration. Click the Install button to install the printer.


15. This progress bar fills four times, so take a break. When it is done, click Next to continue. Don’t click that Cancel button when it hangs for bit because it may do that. You’ll need to be patient, after all it is Microsoft’s operating system and most likely an HP driver.


16. You’ve now completed the installation, click the Finish button to complete the process.


Hopefully, this helps a couple folks that are configuring a Windows XP printer inside a 32-bit Windows XP installation.

Written by maclochlainn

June 7th, 2009 at 12:00 pm

MySQL Installation and More

with 5 comments

Installing MySQL is pretty straightforward, especially on a Windows operating system. However, recently I was surprised to find out that there were folks who didn’t know you could install multiple version on their Windows development machine. Here’s are the step-by-step instructions to do so. At the end of the screen shots you’ll find out how to sign-on and create your first database and user account. Naturally, it’s all at the command line because they work on any platform the same way.

1. After you download an Microsoft Software Installation (MSI) file or the zip file, you launch the installer by clicking the Next button:


2. If you want to install only one copy of the software at any given time, you can accept the default Typical radio button choice. This way, you can simply uninstall the software before you install a new version. When you want to install multiple versions on a single machine, you should check the Custom radio button. This choice lets you maintain multiple versions on your single development machine and check changes between releases. After choosing a direction, you click the Next button to continue.


3. The first thing you should do is upgrade the Developer Components. You do that by clicking on the down arrow to the right of the X

, which yields the context menu below. Place your mouse over the top most This feature will be installed on local hard drive. After that you can begin to customize the installation.


4. This is a step that you’ll see when you opt to do a Custom installation. It is important that you click the Change button and change the default directory for the installation. When you click the Change button it will launch a File Finder window.


5. You can put the files anywhere you choose but I’d recommend that you opt to use something like this directory path:

C:\Program Files\MySQL 5.1\MySQL Server 5.1\

As you’ll see in the screen shot mine is slightly different because my virtual Windows XP machine is a 64-bit operating system. That’s why you’ll see the (x86) as part of the Windows Program Files directory path. It indicates that MySQL will be installed in the 32-bit executable folder. You click the OK button to accept the chosen directory and return control back to the MySQL installation program.


6. The choice of your file directory is now displayed below the caption Install to:, and you click the Next button to continue.


7. Before you click that Next button, you have one more step if you plan on having multiple instances installed on your machine. You need to change the default storage location for data files. You do that by clicking on the MySQL Server Datafiles. When you click on that, you’ll see the following default file location below the caption Install to:

C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\

You click the Change button to enter another location for the database files.


8. After you click on Change button, you’ll see the File Finder. You can then enter the directory that you’d prefer for the installation. My suggestion is the following:

C:\Data\MySQL 5.1\MySQL Server 5.1\

Click on the OK button to complete the selection of a customized database file location.


9. You should now see the wizard screen again. Choose the Next button to cotinue.


10. This is the screen where you see what you’re about to do, before you do it. It should look like this if you’re following my instructions or like whatever you’ve opted to use in your installation. Click the Install button to begin the installation.


11. The installation starts and you’ll see a dialog with a creeping status bar. It should take about 2-3 minutes on many computers but it may seem longer.


After the status bar, you’ll see the following marketing screen. Click the Next button to continue.


12. The second marketing dialog then shows up, just click the Next button to continue.


13. The installation is now complete. You should ensure you’ve checked the Configure the MySQL Server now box. Click the Finish button to end the installation of the file system and begin the configuration of the MySQL server.


14. The next dialog is the configuration welcome. Click the Next button to continue.


15. This is an important dialog because you must choose between a Standard or Detailed configuration. You should check the Detailed radio button When you plan to install more than one MySQL version on your computer because you’ll need to control the listening port for the server. A default MySQL Sever installation sets the listening port at 3306. Typically, you’ll want the main version to run on port 3306 and set the other versions to 3307, 3308, et cetera.


16. This dialog lets you choose how to configure performance characteristics of your MySQL Server. As you become more skilled at MySQL, you’ll find that these are configurable in a file, but for now using the interface is probably your best bet. The choice you make here sets how much memory MySQL will take while running. Typically, you should choose Developer Machine unless this is a server installation or you have a log of extra memorty to dedicate to MySQL Server (that’s the mysqld process).


17. This dialog lets you configure the Inno DB files location. You should make sure that you ensure they’ll be different if you’re installing multiple releases. You click the drop down arrow for the Installation Path box, choose one and manually edit it, like shown for MySQL 5.1.


18. This dialog governs configuration parameters about concurrency. If this is for a developer machine click the Decision Support (DSS)/OLAP radio button. It generally gives you more than enough connections for development activities.


19. This is the dialog where you enable a firewall exception and set a port. Since MySQL 5.1 is my main testing environment, port 3306 (the default) is selected. You also want to enable both check boxes.


20. This dialog lets you choose a multiple byte unicode character set or the standard latin1. For those coming from an Oracle world, that’s WEISO8859-1 character set.


21. This dialog names your Microsoft Windows Service for MySQL. It is important that you change this to represent the release. The default for every release is MySQL. You should also uncheck the Include Bin Directory in Windows PATH, and set that manually in a command shell file (e.g., a mysql51.bat file). You can run the batch file when you want to work in this environment. If you allow this to append to the system path, make sure you know which one you’re using when working with MySQL.


22. This dialog sets the root password. My advise is that you leave unchecked the Create An Anonymous Account and the Enable root access from remote machines boxes. Make sure you use a password that you can remember, even if it is your personal machine.


23. You’re almost done. The next dialog confirms you want to configure MySQL. Click the Execute button to configure the server.


After the configuration, you’ll see the following dialog. It means you’re done.


24. If you encounter a failure starting the service, it’s not infrequent in any number of MSI files. I wrote another post on how to work around it here. The following is the error screen that may occur.


25. Here are the steps to create your own database and user. It also shows you how to grant privileges to the new user on only their database.

(a). You connect as the superuser by calling the client-side mysql program, like the following (assumes you set the password for the root user to cangetin). You don’t need to provide the port number if it is the default 3306 but will need to provide it for any other port that the mysqld service is listening on.

C:\Data> mysql -uroot -pcangetin -P3306

You can confirm your the root user by running the following query:


(b). You create a database with the following syntax:

mysql> CREATE DATABASE sampledb;

(c). You create a user with the trivial password of the user’s name, which is a really bad example when you’re doing anything but writing documentation. The following creates the user and then grants the user all privileges on their database.

mysql> CREATE USER 'myuser' IDENTIFIED BY 'myuser';
mysql> GRANT ALL ON sampledb.* TO 'myuser'@'localhost' IDENTIFIED BY 'myuser';

(d). You sign-off as the root user by typing quit, like

mysql> QUIT;

(e). You sign-on as the restricted myuser with the following syntax:

C:\Data> mysql -umyuser -pmyuser -P3306

You can confirm your the restricted user by running the following query:


(f). You can’t do much except explore generic metadata at this point because you must select a database. You select the sampledb database by doing the following:

mysql> USE sampledb;

You could now create a sample table that uses automatic numbering, insert values, and query the contents by using the following syntax.

                           , sample_text VARCHAR(20));
mysql> INSERT INTO sample (sample_text) VALUES ('One'),('Two'),('Three'),('Four'),('Five');
mysql> SELECT * FROM sample;
| sample_id | sample_text |
|         1 | One         |
|         2 | Two         |
|         3 | Three       |
|         4 | Four        |
|         5 | Five        |

Alternatively, you could place those three commands (minus the “mysql>” on each line) in a file and run the file from the command line. Just so there’s no misunderstanding, the file would look like this:

-- Open the database.
USE sampledb;
-- Split standard out, and write a log file to the relative directory.
TEE C:/DATA/sample.txt
-- Run code.
                    , sample_text VARCHAR(20));
INSERT INTO sample (sample_text) VALUES ('One'),('Two'),('Three'),('Four'),('Five');
SELECT * FROM sample;
-- Turn off tee, close file to automatic appending.

If you named the file sample.sql and it is found in the C:\Data directory, you’d run it like this:

mysql> SOURCE C:/DATA/sample.sql

This completes the basic steps, I’ll put a link here for a cross platform comparative tutorial on client-side command line interfaces, like Oracle’s sqlplus, MySQL’s mysql, and Microsoft SQL Server 2008’s sqlcmd.

Written by maclochlainn

May 24th, 2009 at 10:29 pm

Posted in Microsoft XP,MySQL

MySQL MSI Service Fails

with 4 comments

While installing the MySQL 6.0 Alpha release, I encountered a failure running the configuration component. It shows the following dialog, which hangs until you cancel it. By the way, I’ve encountered this on other MySQL 5.0 and 5.1 installs from time to time.


Don’t uninstall and reinstall because nothing will change. The only problem appears to be setting the root password. This show you how to verify it and fix the missing configuration step. While the service says it failed, it actually started. You can check that by launching services.msc from Start and Run.

You can verify the problem by attempting to connect to the MySQL server. My server is setup on localhost with port 3308 because there are multiple MySQL servers running on my virtual machine. A typically connection would look like this if your password was cangetin (the old Solaris training password):

C:\>mysql -uroot -pcangetin -P3308

If you get the following error message, it’s most likely a missing root password.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Since my machine is running multiple MySQL servers and it’s my preference to associate their execution to their binaries, the paths to the installations aren’t loaded automatically on installation. A quick caution, my path statements are from the Windows XP 64-bit installation and they’ll differ from a 32-bit installation path. Specifically, the executable programs are in C:\Program Files (x86) directory not C:\Program Files. You can set the path like this:

C:\>set PATH=C:\Program Files (x86)\MySQL 6.0\MySQL Server 6.0\bin;%PATH%

To verify and fix the problem requires you login without a password, connect to the mysql database, and query the user table. All those steps follow below, unless you’re on Microsoft Vista. If you’re running Microsoft Vista follow these instructions.

C:\>mysql -uroot -P3308
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 6.0.10-alpha-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> USE mysql;
Database changed
mysql> SELECT host, user, passowrd
    -> FROM user WHERE user='root' AND host='localhost'\G
*************************** 1. row ***************************
                  Host: localhost
                  User: root
1 row in set (0.00 sec)

You fix this problem by running the following grant of privileges to the root user:

mysql> GRANT ALL ON *.* TO 'root'@'localhost'
Query OK, 0 rows affected (0.00 sec)

I learned this technique by attending the MySQL for Database Administrator’s course. I hope it solves a mystery for somebody along the way. I also hope that Oracle Education maintains the excellent folks that Sun Microsystems acquired when they snagged MySQL.

Written by maclochlainn

May 7th, 2009 at 11:40 pm