Jump to content


Photo

cannot connect with with MySQL root user


  • Please log in to reply
2 replies to this topic

#1 PichelM

PichelM
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationEdinburgh, UK

Posted 02 October 2003 - 03:29 PM

I\'m really losing the will to live here. I\'m now into my 2nd installation of mySQL under OS X 10.2.8. My first install was removed using Marc Liyanage\'s removal script and did a nice and tidy job.

2nd install went fine, I managed to do a test connect using
[list]
I then went ahead and did (as recommended) the setting of the password for the root user via:
[list]
And now (just as before in the first install) I can\'t connect to the database using the root user. the following line
[list]/usr/local/mysql/bin/mysql --user=root mysql
[list]
comes back with
ERROR 1045: Access denied for user: \'root@localhost\' (Using password: NO)
which suggests that I haven\'t set the password... but I have (see above)

Oddly enough, I can connect to mySQL using the mySQL user (standard in OS X 10.2) via:
[list]
but I can\'t really do anything as any attempt to create for example
[list]mysql> INSERT INTO user VALUES(\'localhost\',\'root\',PASSWORD(\'some_pass\'),
-> \'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\');[list]
results in ERROR 1046: No Database Selected

What am I doing wrong ? help !!!

PM
http://www.Pixelbase.co.uk - Web Design - eCommerce Development - Webmastering - Translation

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 02 October 2003 - 04:10 PM

try using the p switch:

/usr/local/mysql/bin/mysql --user=root mysql -p


you should get prompted for a password.

for the no databased selected error type use databasename; once you are connected, then attempt your insert.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 PichelM

PichelM
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationEdinburgh, UK

Posted 02 October 2003 - 04:19 PM

thanks effigy - think I\'m a step further now. running \'status\' in mysql now says I\'m logged in as root@localhost.

many thanks,
PM
http://www.Pixelbase.co.uk - Web Design - eCommerce Development - Webmastering - Translation




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users