hey everyone, i have 2 machines that have the same problems. i installed MySQL from the packaged files found on the net, and evrything worked fine, until my terminal app crashed. then i get the error that i dont have access permission for localhost and no password has been set.
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
now, i see where it says Using password: NO), and i tried to set a password with the following command:
mysaladmin -u root password mypass
i tried with 'mypass' also, ive also tried other things, like reinstalling mysql, database, etc. i dont know what i need to do to set a password. please keep in mind that i am a newbie, and im trying to learn this stuff on my own, so any help (as in talk to me like im a newbie) will be appriciated!
ive also tried to search the manual.
thanks!!!!!
access problems MySQL Mac X 10.2
Moderator: General Moderators
Yeah, this can be a real pain! As far as I can remember, MySQL is installed with default permissions that allow access by the root user, from localhost, without a password. Try: and you should be OK. Then set up your database/user access (the MySQL manual calls this "Grants"). There are different ways to do this, the scheme I use is: for each database add an entry to the DB table with no privs, then add a corresponding user with the privs you require:
Good luck 
PS Have you checked Mark Liyanage's page?
Code: Select all
sudo mysqlCode: Select all
sudo mysql
CREATE DATABASE mydatabasename;
USE mysql;
INSERT INTO db SET Host="localhost", Db="mydatabasename", User="myusername";
INSERT INTO user SET Host="localhost", User="myusername", Password=password("mypassword"), Select_priv="Y", Insert_priv="Y", Update_priv="Y", Delete_priv="Y";PS Have you checked Mark Liyanage's page?
thanks for the reply
thanks for the reply but i cant get in at the first command. i get the permission denied error when i try sudo mysql. i tried it as root also. i also tried to go to the sql directory (cd /usr/local/mysql) and still get the denied error. is there any way i can reset or re-install the password? thanks for your help!