12 messages in com.mysql.lists.mysqlRe: i'm at a complete loss?
FromSent OnAttachments
Daniel McQuay28 May 2006 17:17 
Greg Maruszeczka29 May 2006 09:02 
Daniel McQuay29 May 2006 16:34 
David Griffiths29 May 2006 16:57 
Daniel McQuay29 May 2006 17:22 
Logan, David (SST - Adelaide)29 May 2006 17:25 
Daniel McQuay29 May 2006 17:49 
Daniel McQuay29 May 2006 17:54 
Logan, David (SST - Adelaide)29 May 2006 17:55 
Daniel McQuay29 May 2006 18:08 
Logan, David (SST - Adelaide)29 May 2006 18:26 
Daniel McQuay29 May 2006 18:30 
Subject:Re: i'm at a complete loss?
From:Daniel McQuay (simp@gmail.com)
Date:05/29/2006 05:54:53 PM
List:com.mysql.lists.mysql

Just for shits and giggles I tried boxster# /usr/local/bin/mysql_install_db --user=root and then tried logging in as root mysql -u root and now it says

<snip> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) </snip>

I googled that and found no resolve to the problem. FYI I had seen that error before on my machine and tried to solve, but with no luck.

Yeah when I ran it the first time I get this message:

<snip> boxster# /usr/local/bin/mysql_install_db --user=mysql Installing all prepared tables Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/local/bin/mysqladmin -u root password 'new-password' /usr/local/bin/mysqladmin -u root -h boxster.mydomain.com password 'new-password' See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the /usr/local/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command!

You can start the MySQL daemon with: cd /usr/local ; /usr/local/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/local/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com boxster# </snip>

I then follow the directions on setting a password for root but I get basically the same error message.

<snip> boxster# /usr/local/bin/mysqladmin -u root password '********' /usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' boxster# </snip>

Even though I get an error message I tried running cd /usr/local ; /usr/local/bin/mysqld_safe but I then get this error:

<snip> boxster# cd /usr/local ; /usr/local/bin/mysqld_safe & [1] 33209 boxster# Starting mysqld daemon with databases from /usr/local/var STOPPING server from pid file /usr/local/var/boxster.mydomain.com.pid 060529 20:45:47 mysqld ended

[1] Done ( cd /usr/local; /usr/local/bin/mysqld_safe ) boxster# </snip>

I went to that directory and read the error log and it says I have an instance of mysqld running, which I do. ps auxw | grep myslqd show it there running.

Thanks again!

On 5/29/06, Logan, David (SST - Adelaide) <Davi@hp.com> wrote:

Hi Daniel,

Sounds like there are a few records missing out of the mysql tables. Did you run mysql_install_db?

http://dev.mysql.com/doc/refman/4.1/en/unix-post-installation.html

Regards

--------------------------------------------------------------- ********** _/ ********** David Logan ******* _/ ******* ITO Delivery Specialist - Database ***** _/ ***** Hewlett-Packard Australia Ltd **** _/_/_/ _/_/_/ **** E-Mail: davi@hp.com **** _/ _/ _/ _/ **** Desk: +618 8408 4273 **** _/ _/ _/_/_/ **** Mobile: 0417 268 665 ***** _/ ****** ****** _/ ******** Postal: 148 Frome Street, ******** _/ ********** Adelaide SA 5001 Australia i n v e n t

---------------------------------------------------------------

-----Original Message----- From: Daniel McQuay [mailto:simp@gmail.com] Sent: Tuesday, 30 May 2006 9:53 AM To: David Griffiths Cc: mys@lists.mysql.com Subject: Re: i'm at a complete loss?

When I log in using mysql which by the way is the only user that I can log into with I get <snip> mysql> USE mysql; ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql' </snip> I have to log in to using mysql -u mysql and it drops me into the mysql command line. It seems as though the user "mysql" has absolutely no privileges to do any thing and I cant log in as root. So I have no idea what I did wrong but this is the third time I installed MySQL41 and I don't think reinstalling would do any thing different.

Thanks go out to every one for trying to help me, but like I said I have no idea as to whats wrong.

On 5/29/06, David Griffiths <dgri@boats.com> wrote:

Log into the server, and type, "use mysql;" without the quotes.

Look at the "user" table - that defines what user can connect to the database, the ip addresses they can use, and the password they must provide.

For example, you could enter,

"INSERT INTO USER (host, user, password) values ('127.0.0.1', 'mysql', password(mysql));

and

"INSERT INTO USER (host, user, password) values ('localhost', 'mysql', password(mysql));

Don't forget to do a "flush privileges;" afterwards (again, no quotes);

The mysql schema is thoroughly (but dryly) documented @ http://dev.mysql.com

Daniel McQuay wrote:

Thanks Greg, I did try that here is what happened.

boxster# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) boxster#

So I really just don't know what to do from here. I'm up for any ideas if any one has 'em.

On 5/29/06, Greg Maruszeczka <gr@grokking.org> wrote:

On Sun, 28 May 2006 20:17:53 -0400 "Daniel McQuay" <simp@gmail.com> wrote:

Hello list,

I just installed MySQL on my FreeBSD box here at home and am

having

a

few problems with privileges. I can connect to mysql using; mysql -u mysql and there is no password needed. However, when I try to connect to the server using root; mysql -u root I get an error; <snip> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) </snip> so reading that it appears that I need a password so i try; mysql -u root -p it prompts me for my root pass and when I put it in it does that same thing above but with (using password: YES).

I went to the the MySQL web site and read 2.10.3 Securing the Initial MySQL Accounts and tried following along with that but with no luck. When checking google for help I read a lot about the initial installation. Something about /usr/local/bin/mysql_install_db will install a privilege table.

I installed mysql using this guide here http://raybdbomb.com/p/mysql-install-on-freebsd.html and every thing seemed to go well but like I said I keep getting this error. Is there something else I should do? Any help on this would be MUCH appreciated.

Hi,

Wasn't clear to me in reading your post that you did this so here goes:

Did you actually set a root password for mysql using a GRANT statement after logging in with the default BLANK password?

mysql -u root -p [then just hit enter]

HTH, G