Avoiding Common Installation Problems

It can be extremely frustrating when things go wrong, and you haven't even managed to get started yet. For novices especially, it's difficult to know what to do when faced with an esoteric error message (if you're even lucky enough to get one). The following sections looks at some of the common problems when installing.

Problems Starting mysqld

Problems starting mysqld usually make themselves noticed when you try to install the permission tables and have no success. There are many reasons for problems, as you'll see in the following list, and examining the error log is the best way to see what the problem could be.

  • You may have a problem with your configuration file (my.cnf or my.ini). Check your syntax carefully, or use the standard configuration file that came with your distribution to see if you can start MySQL.

  • Another common error is the following:

    Can't start server: Bind on unix socket....

    or the following:

    Can't start server: Bind on TCP/IP port: Address already in use

    This error occurs when trying to install a second copy of MySQL onto the same port or socket as an existing installation. Make sure you specify a different port or socket before starting.

  • Permission problems are common, too. Make sure you've followed the steps listed in the installation section so that at least the MySQL directories are correct. If you're using sockets, you need to make sure you have permission to write the socket file as well (usually to /tmp).

  • Another common problem is with libraries. For example, if you run Linux and have installed shared libraries, make sure the location of these shared libraries is listed in your /etc/ld.so.conf file. For example, if you have:

    /usr/local/lib/mysql/libmysqlclient.so

    Make sure /etc/ld.so.conf contains:

    /usr/local/lib/mysql

    Then run ldconfig.

  • When starting MySQL where there are existing BDB tables, you may find a problem such as the following:

    020814 19:18:02  bdb:  warning: ./bdb/news.db: No such file or directory 020824 19:18:02  Can't init databases

This means that BDB had a problem recovering an existing log file. You can either start MySQL with the --bdb-no-recover option, or move the log files away.

Compile Problems

If you run into problems compiling and need to do it a second time, you'll need to make sure configure is run from a clean slate; otherwise, it uses information from its previous incarnation, stored in the file config.cache. You'll need to remove this file each time you configure. Also, old object files may still be in existence, and to ensure a clean recompile, you should remove these. Run the following:

 % rm config.cache % make clean 

You can also run distclean, if you have it.

Your compiler may be out of date. Currently MySQL suggests using gcc 2.95.2, or egcs 1.0.3a, but this is likely to have changed, so check the latest documentation.

Other problems could result from an incompatible version of make. Currently, MySQL recommends GNU make, version 3.75 or higher.

If you get an error when compiling sql_yacc.cc, you may have run out of disk space. In some situations, compilation of this file uses up too many resources (even when there is seemingly lots available). The error could be one of the following:

Internal compiler error: program cc1plus got fatal signal 11 Out of virtual memory Virtual memory exhausted

Running configure with the --low-memory option usually solves the problem:

 % ./configure --with-low-memory 

If you're having problems with related libraries, such as g++, libg++, or libstdc++ (perhaps they're unavailable), try setting gcc to be your C++ compiler, as follows:

 % CXX="gcc -O3" ./configure 

Linking statically, besides being more optimal, can also solve problems with undefined references.

Windows Problems

If you double-click setup.exe, and the process begins but never completes, you may have something interfering with MySQL. Try one of these procedures:

  • Close all Windows applications, including services and ones from the system tray.

  • Alternatively, try the install in Safe mode (by pressing F8 when booting, then choosing the option from the menu).

  • At worst, you may have to reinstall Windows and install MySQL first, before anything else gets in the way. The problem is less likely to occur in production machines dedicated as MySQL database servers. Rather, they're likely in multipurpose computers where you're running all kinds of other applications.



Mastering MySQL 4
Mastering MySQL 4
ISBN: 0782141625
EAN: 2147483647
Year: 2003
Pages: 230
Authors: Ian Gilfillan

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net