Date: Sat, 9 Jan 2010 06:06:09 -0800 (PST) From: jaymax <jaymax36@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: mySQL 5.4 server & Post installation SNAFUs Message-ID: <27089065.post@talk.nabble.com> In-Reply-To: <4B4852D4.90002@infracaninophile.co.uk> References: <27086064.post@talk.nabble.com> <4B4852D4.90002@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27089065.post>