Matthew_J
04-09-2002, 02:22 PM
I installed the RPMs for MySQL on my Red Hat 7.2 server. Now when I try to set the roots password I always get this error:
ERROR 2002: Can't connect to local MySQLserver though socket '/var/lib/mysql/mysql.sock' (111)
I have looked around at MySQL's site and couldn't find anything useful. What can I do to solve the problem?
Most probably MySQL server is not running.
Check using 'ps ax |grep mysql'
And use the startup script to start the daemon :)
serve-you
04-09-2002, 03:03 PM
If MySQL is in fact running, the problem is likely that your mysql.sock file is in /tmp not /var/lib/mysql.
Try 'locate mysql.sock'
To resolve that, simlply symlink them.
-Dan
mkaufman
04-09-2002, 04:13 PM
I hate the MySQL RPMs I could never get them working..why not install from source? It's real easy, here's a quick run-down:
./configure --prefix=/usr/local/mysql
make
make install
cd scripts
./mysql_install_db
to start: /usr/local/mysql/bin/safe_mysqld --user=user
hope that helps? :)
bitserve
04-09-2002, 08:08 PM
I always compile from source too. But the docs recommend a few more options than matt mentioned.
If you are using a recent version of *gcc*, recent enough to understand `-fno-exceptions' option, it is *VERY IMPORTANT* that you use it. Otherwise, you may compile a binary that crashes randomly. We also recommend that you use `-felide-contructors' and `-fno-rtti' along with `-fno-exceptions'. When in doubt, do the following:
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enab
le-assembler --with-mysqld-ldflags=-all-static
On most systems this will give you a fast and stable binary.
More than likely the compile options will automatically be added by configure, but I don't think that the "--enable-assembler --with-mysqld-ldflags=-all-static" are.
Matthew_J
04-10-2002, 10:13 AM
I think my problem is from reading on the MySQL web site is that my GCC version is 2.96 and for some reason that version casues problems with MySQL.
On the web site it suggested to downgrade to version 2.95. I am new to Linux so how would I go about doing that?
Thank you for your help!
serve-you
04-10-2002, 10:56 AM
That should not be a problem. I run 2.96 on all of my machines.
-Dan
Matthew_J
04-23-2002, 12:34 PM
I downloaded and installed the source but the thing is still giving me that error. Is there anyway to fix it?