Fixing MySQL after upgrading to Mac OS X 10.2
Introduction
Many users who installed the GoLive Preconfigured Servers and MySQL on Mac OS X 10.1.x found that MySQL was broken after they upgraded to Mac OS X 10.2. If you run the Start MySql script and get an error message as seen below in Figure 5.1 then you need to fix your MySQL installation under OS X 10.2. The good news is that it's very easy and this step-by-step tutorial will walk you through the process.

Figure 5.1
Background
When you installed MySQL under Mac OS X 10.1.x you had to create a user account called mysql so MySQL could run properly. Now with Mac OS X 10.2, Apple conveniently includes a default mysql user in the system so you no longer need to create that user account yourself. The problem addressed in this tutorial only arises when you install MySQL under Mac OS X 10.1.x and then upgrade to Mac OS X 10.2 because the standard user account created on the machine for MySQL is hijacked or overwritten by a Netinfo only user account of the same name. Bascially, we'll just delete the Netinfo user in Netinfo Manager and recreate the standard user account.
Step 1: Locate and launch the NetInfo Manager Application
Find the NetInfo Manager application in your Applications/Utilities folder and launch it by double-clicking. The application icon looks like the one in Figure 5.2.

Figure 5.2
Step 2: Authenticate to Make Changes
Caution: Unless you know how to use the NetInfo Manager application make sure you perform only the steps in this tutorial exactly as described. Incorrect use of NetInfo Manager could result in data loss or damage to the operating system.
Select Security>Authenticate... as seen in Figure 5.3 to gain secure access to this system.

Figure 5.3
When prompted, enter an administrator's username and password as seen below in Figure 5.4.

Figure 5.4
Step 3: Delete the MySQL User
After you have authenticated successfully, click users at the bottom of the middle column and then select mysql from the list of users in the right column as seen below in Figure 5.5. Verify you have selected the mysql user and click the Delete button in the top left corner of the NetInfo Manager window.

Figure 5.5
After you click the Delete button you will be asked to confirm the modification as seen below in Figure 5.6. When you are ready to proceed click Delete and NetInfo Manager will delete the problematic MySQL user.

Figure 5.6
When the MySQL user has been deleted the list of users in NetInfo Manager should look something like Figure 5.7.

Figure 5.7
Step 4: Create a New mysql User
To create a properly working mysql user make sure you are currently logged into an account on your Mac OS X system that has administrator privileges. Open the "Accounts" System Preferences Pane and click New User... as seen below in Figure 5.8.

Figure 5.8
Create a new user with the name of MySQL User and the short name of mysql as seen below in Figure 5.9. Note that the Short Name must be lower case and match mysql exactly but the longer name does not have to match exactly. Set the password to anything you want and click Save.

Figure 5.9
If this is the first time you've created another user account you might see a dialog box like the one in Figure 5.10 prompting you to make a decision about the Automatic Login preferences. Because the new mysql user is created only to allow the MySQL databases to run properly and not for normal use, most users should click Keep Automatic Login.

Figire 5.10
When you have successfully created the the new mysql user account you'll see it listed in the Accounts preference pane as seen below in Figure 5.11. Quit the System Preferences (Command-Q) and proceed to the next step.
 Figure 5.11
Step 5: Start MySQL
After fixing the user account problem, you need to start MySQL in order to use it to serve databases. Remember, you need to do this each and every time you restart your computer. Double-click the Start MySql (Figure 5.12) alias that was installed by the GoLive Preconfigued Servers installer on your Desktop to run the start_mysql.command in the preconfigured server install folder (usually /Applications/GoLive Preconfigured Servers). If you see an error dialog requesting an application to use for the selected file choose the Terminal application located in the /Applications/Utilities folder.
 Figure 5.12
A Terminal window should open and look like Figure 5.13 when successfully completed.
 Figure 5.13
Conclusion
When you've completed this fix you should be able to get back to work immediately and everything should work just as it did under Mac OS X 10.1.x. For more free tutorials, tips, and tricks visit the Tips page.
|