From owner-freebsd-questions@FreeBSD.ORG Mon Apr 19 10:02:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 940E416A4CE for ; Mon, 19 Apr 2004 10:02:53 -0700 (PDT) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id E94EF43D45 for ; Mon, 19 Apr 2004 10:02:52 -0700 (PDT) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i3JH8Edu079683; Mon, 19 Apr 2004 18:08:25 +0100 (BST) (envelope-from peter@circlesquared.com) Message-ID: <4084077E.1050105@circlesquared.com> Date: Mon, 19 Apr 2004 18:08:14 +0100 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040327 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Micah Bushouse References: <4083FED9.1070605@circlesquared.com> <40840127.5040102@msu.edu> In-Reply-To: <40840127.5040102@msu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: ilich cc: freebsd-questions@freebsd.org Subject: Re: MySQL X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 17:02:53 -0000 Micah Bushouse wrote: > > > Peter Risdon wrote: > >> ilich wrote: >> >>> >>> >>> Hello All! >>> I have small problem. >>> I installed apache2\php4\mysql. Apache and php work fine, but mysql >>> doesn't work. When I enter "mysql" to my console it send massage >>> "Can't connect to local MySQL server through socket >>> 'tmp/mysql.socket'". As far as I Know mysqld doesn't load to memory, >>> but I'm not sure.Please, give me any advices and explain me what >>> does mean this massage. >> >> >> >> >> You probably need to start mysql: >> >> #/usr/local/etc/rc.d/mysql-server.sh start >> >> PWR > I think you're actually trying to start the mysql client, which defaults to attempt a connection localhost when no cmd arguments are given. Since mysqld isn't running, the mysql client will complain about the socket. If you're using mysql 4.x (mysql 3.x will be very similar, except the daemon may be named safe_mysqld), try these steps: > whereis mysqld_safe then run as root the resulting path, for example, on my machine I would use > /usr/local/bin/mysqld_safe & that should work! ~Micah That's what the startup script does: # less /usr/local/etc/rc.d/mysql-server.sh #!/bin/sh DB_DIR=/var/db/mysql PIDFILE=${DB_DIR}/`/bin/hostname -s`.pid case "$1" in start) if [ -x /usr/local/bin/mysqld_safe ]; then /usr/bin/limits -U mysql \ /usr/local/bin/mysqld_safe --user=mysql --datadir=${DB_DI R} --pid-file=${PIDFILE} > /dev/null & echo -n ' mysqld' fi ;; But I'd use this rc.d script if there's a problem like the OP reported because it will govern how the daemon starts when the machine boots, so it needs to be working. PWR.