From owner-freebsd-questions@FreeBSD.ORG Sat Jan 9 14:06:10 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E64A7106566B for ; Sat, 9 Jan 2010 14:06:09 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id BAE048FC12 for ; Sat, 9 Jan 2010 14:06:09 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NTbxB-0002H5-19 for freebsd-questions@freebsd.org; Sat, 09 Jan 2010 06:06:09 -0800 Message-ID: <27089065.post@talk.nabble.com> Date: Sat, 9 Jan 2010 06:06:09 -0800 (PST) From: jaymax To: freebsd-questions@freebsd.org In-Reply-To: <4B4852D4.90002@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jaymax36@gmail.com References: <27086064.post@talk.nabble.com> <4B4852D4.90002@infracaninophile.co.uk> Subject: Re: mySQL 5.4 server & Post installation SNAFUs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 14:06:10 -0000 OK Thanks again, still having problems with setting the root password. There is no my.cnf file Matthew Seaman-2 wrote: > > jaymax wrote: > >> Post installation SNAFUS >> ======================== > > >> [iv] /usr/local/bin/mysqladmin -u root password ==> >> ax# /usr/local/bin/mysqladmin -u root password 'xxxxxxxx' >> /usr/local/bin/mysqladmin: connect to server at 'localhost' failed >> error: 'Access denied for user 'root'@'localhost' (using password: NO)' >> ax# /usr/local/bin/mysqladmin -u root -h ax.lall.com password xxxxxxxx >> /usr/local/bin/mysqladmin: connect to server at 'ax.lall.com' failed >> error: 'Access denied for user 'root'@'ax.lall.com' (using password: NO)' >> HOW can I setup root password ? > > If you're currently logged into ax.lall.com, then you definitely want > to use '-h localhost' (or nothing, as that's the default). If there is > already a root password, obviously you need to give it. Conversely, if > you've got a password set in /root/.my.cnf or some other my.cnf file but > this is a brand new mysql install with no root password yet, then you need > to temporarily move that file aside: mysql doesn't let you in if you try > and supply a password for a no-password account. > > I advise using mysql_secure_installation -- but you're still going to have > to move aside any pre-existing .my.cnf files. Also, as a general security > thing, preferably don't allow root logins to mysql from anywhere other > than > localhost. > > There was a v 6.2 install attempt but had to be rolled back. All files were removed 'hopefully'. Version 5.5 was downloaded to a src directory but not installed. A "find -f /* -name 'my.cnf' -print" search found nothing except copies in the src directory of v 5.5 and those in the ports. When the server is started with "/usr/local/bin/mysqld_safe &" I get the same responses as above re: setting the root password attempt > /usr/local/bin/mysqladmin -u root -h localhost password xxxxxxxx > /usr/local/bin/mysqladmin: connect to server at 'localhost' failed > error: 'Access denied for user 'root'@'localhost' (using password: NO)' > When I attempt with a "/usr/local/bin/mysql_secure_installation" start (after killing the mysql safe start) I get the following ==> > In order to log into MySQL to secure it, we'll need the current > password for the root user. If you've just installed MySQL, and > you haven't set the root password yet, the password will be blank, > so you should just press enter here. > > Enter current password for root (enter for none): > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/tmp/mysql.sock' (2) > Enter current password for root (enter for none): > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/tmp/mysql.sock' (2) > Enter current password for root (enter for none): > So I obviously have the wrong approach, please advise. Thanks! -- View this message in context: http://old.nabble.com/mySQL-5.4-server---Post-installation-SNAFUs-tp27086064p27089065.html Sent from the freebsd-questions mailing list archive at Nabble.com.