MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Linux’ Category

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.

mysql6servicefailure

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
              Password:
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'
    -> IDENTIFIED BY 'cangetin' WITH GRANT OPTION;
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

VMWare and Fedora 10

without comments

It sometimes gets tiresome to sort the VMWare compatibility issues with Linux release-by-release but at the end of the cycle it’s fine. I downloaded the current Fedora 10 Live release because it is so much smaller than the install disk. It uses a kernel of 2.6.27.5-117.fc10.i686. I encountered a critical errors when I tried to install the VMWare Toolkit from VMWare Fusion, version 2.0.3 (156731). The only error guidance you’ll get is that there isn’t any make file.

There’s a twist here if you’re most familiar with Ubuntu and sudo command execution. You need to su to the root account and run everything as root user. An alternative would be to edit the /etc/inittab file to allow the root user to boot the instance. The default is 5 (X11). You enable the root user by changing it to 3 (full multiuser mode). Don’t forget to change it back, you really shouldn’t log in as the root user. Anyway, you’ll have to do it to run the VMWare Toolkit successfully as shown later in the post.

You fix the incompatibility of the VMWare Fusion Toolkit by downloading the following two missing RPMs. You should be able to find them here. As to why they’re not in the Live DVD distribution, who knows.

binutils-2.18.50.0.9-8.fc10.i386.rpm
gcc-4.3.2-7.i386.rpm
glibc-2.9-2.i686.rpm
glibc-devel-2.9-2.i386.rpm
glibc-headers-2.9-2.i386.rpm
kernel-devel-2.6.27.5-117.fc10.i686.rpm
kernel-headers-2.6.27.5-117.fc10.i386.rpm
libgomp-4.3.2-7.i386.rpm

You can’t run some of them through the RPM utility, so you should probably run them all at the command line. The command line syntax and sequence for these packages is:

rpm -ivh kernel-headers-2.6.27.5-117.fc10.i386.rpm
rpm -ivh kernel-devel-2.6.27.5-117.fc10.i686.rpm
rpm -ivh binutils-2.18.50.0.9-8.fc10.i386.rpm
rpm -ivh libgomp-4.3.2-7.i386.rpm
rpm -ivh glibc-headers-2.9-2.i386.rpm
rpm -ivh glibc-devel-2.9-2.i386.rpm
rpm -ivh glibc-2.9-2.i686.rpm
rpm -ivh gcc-4.3.2-7.i386.rpm

As the root user, you can now install the VMWare Toolkit. While running the installation, you’ll receive a prompt to confirm the /usr/src/linux/include. Don’t accept the default path because it won’t work unless you created a symbolic link. The kernel header files require you to enter the following path:

/usr/src/kernels/2.6.27.5-117.fc10.i686/include

Everything should work finxs e when you compile the modules. Hope this helps a couple folks.

Written by maclochlainn

April 11th, 2009 at 6:01 pm

Posted in Linux,Mac,Red Hat,VMWare

Aborting hung VMWare

without comments

Customizing the toolbar is one of the things that I’ve found important in using VMWare Fusion to test various Linux distributions. It’s nice they put Suspend by default on the toolbar but it would be nicer still if they put Shut Down. I got tired of looking for the PID to manually kill the virtualization from the Terminal command line. It is so much easier to add a Shut Down widget before trying to install VMWare Tools because that’s where some distributions hang.

Here are the steps to customize the toolbar:

1. Right click on the toolbar before running the VMWare instance, and you’ll see this context menu. Choose the Customize Toolbar… choice from the list.

vmwarecustomize1

2. The prior step lets you customize the toolbar though the following menu option dialog. Just click on the icon you want and drag it on to the toolbar. I’d suggest dragging Shut Down and Full Screen on to the toolbar.

vmwarecustomize2

I prefer putting the Shut Down to the left of the Suspend button, like this:

vmwarecustomize3

Hope this helps somebody.

Written by maclochlainn

April 11th, 2009 at 1:39 pm