Jump to content

cannot connect with with MySQL root user


PichelM

Recommended Posts

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

I then went ahead and did (as recommended) the setting of the password for the root user via:

And now (just as before in the first install) I can\'t connect to the database using the root user. the following line

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

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:

but I can\'t really do anything as any attempt to create for example

  • mysql> INSERT INTO user VALUES(\'localhost\',\'root\',PASSWORD(\'some_pass\'),

-> \'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\',\'Y\');

results in ERROR 1046: No Database Selected

 

What am I doing wrong ? help !!!

 

PM

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.