Online Book Reader

Home Category

MySQL in a Nutshell [10]

By Root 22054 0
/usr/bin/mysqladmin

Of course, change the name of the hard drive and its path to how it reads on your system. At this point, you should be able to start the daemon and log into MySQL. This is the same for both the TAR and the PKG method of installation on a Macintosh system:

sudo /usr/local/mysql/bin/mysqld_safe &

mysql -u root -p

Depending on the release of MySQL, the file path for a PKG installation may be different than shown here. An ampersand (&) sends the process to the background.

Once MySQL is installed and running, you need to make some postinstallation adjustments that are explained in the last section of this chapter (Postinstallation”).

Novell NetWare Distributions

If your server is using Novell NetWare 6.0 or later, and the required Novell support packs have been installed, you can install MySQL on it. For version 6.0 of NetWare, you need to have Support Pack 4 installed and updated along with the current version of LibC. For version 6.5 of NetWare, Support Pack 2 needs to be installed and updated along with the current version of LibC. You can obtain support packs from Novell’s site (http://support.novell.com). You can find the latest version of LibC at http://developer.novell.com/wiki/index.php/Libraries_for_C_(LibC). Another requirement for installing MySQL is that the MySQL server and data be installed on a Novell Storage Services (NSS) volume.

If an older version of MySQL is already installed and running on your server, you need to shut down the MySQL service before installing and running the newer version. You can do this from the server console like so:

mysqladmin -u root shutdown

Next, you need to log on to the server from a client that has access to the location (SYS:MYSQL) where MySQL is to be installed. Unpack the compressed binary package to that location. When the ZIP file has finished unpacking, you can establish a search path for the directory that holds the MySQL NetWare Loadable Modules (NLMs) by entering the following from the server console:

SEARCH ADD SYS:MYSQL\BIN

At this point, MySQL is basically installed. Now you need to generate the initial privileges or grant tables. You can do this by entering the following from the server console:

.\scripts\mysql_install_db

The mysql_install_db utility is a script provided with the distribution to generate the initial privileges or grant tables (i.e., the mysql database). Once this is done, MySQL is ready to be started. To do this, just enter the following from the server console:

mysqld_safe

To have MySQL started at boot time, you must add the following lines to the server’s autoexec.ncf file:

SEARCH ADD SYS:MYSQL\BIN

MYSQLD_SAFE --autoclose --skip-external-locking

The first line establishes the search path for MySQL. The second line starts the mysqld_safe daemon at startup. The first option in this command instructs the server to close MySQL automatically when the server shuts down. The second option instructs the server not to allow external table locking. (External locks can cause problems with NetWare version 6.0.) Both of these options are recommended.

Once MySQL is installed and running, you will need to make some postinstallation adjustments that are explained in the last section of this chapter (Postinstallation”).

Windows Distributions

Installing MySQL on a server using Windows is fairly easy. If MySQL is already installed and running on your server and you want to install a newer version, you will need to shut down the existing one first. For server versions of MS Windows (e.g., Windows NT), MySQL is installed as a service. If it’s installed as a service on your server, you can enter the following from a DOS command window to shut down the service and remove it:

mysqld -remove

If MySQL is running, but not as a service, you can enter the following from a DOS command window to shut it down:

msyqladmin -u root shutdown

MySQL AB’s site (http://dev.mysql.com/downloads/) contains three installation packages: a Windows Essential package, a standard Windows package, and a standard Windows package without the

Return Main Page Previous Page Next Page

®Online Book Reader