hello boombot-ga,
MySQl has great documentation. The docs specifically address your
question and is a common error. Without knowing your version of
MySQL..
http://dev.mysql.com/doc/refman/4.1/en/access-denied.html
"#
If you try to connect as root and get the following error, it means
that you do not have an row in the user table with a User column value
of 'root' and that mysqld cannot resolve the hostname for your client:
Access denied for user ''@'unknown' to database mysql
In this case, you must restart the server with the --skip-grant-tables
option and edit your /etc/hosts file or \windows\hosts file to add an
entry for your host."
so..you can get to your terminal and issue
cat /etc/hosts
and make sure "127.0.0.1 localhost $the hostname" is in there,
(where $the hostname is the name of your machine, ie..xyz.foo.com, or
xyz) if not
as root issue
shell> echo "127.0.0.1 localhost localhost.localdomain $hostname" >>/etc/hosts
to start mysql with the --skip-grant-tables option **i think, not too
familar with macs**
shell> /usr/local/mysql/bin/mysqld --skip-grant-tables
then you can try to get into mysql with
shell> mysql -u root mysql or shell> mysql -u root test
The document listed above should be able to answer the rest of your questions
good day |