php - Access denied for user 'username'@'localhost' (using password: YES) -


i installed mysql on mac running 10.10.3, can't create tables or modify associated databases. when start mysql logs me in '@localhost'

mysql> select user(); +-----------------------+ | user()                | +-----------------------+ | username@localhost    | +-----------------------+ 1 row in set (0.00 sec)  mysql> select current_user(); +----------------+ | current_user() | +----------------+ | @localhost     | +----------------+ 1 row in set (0.00 sec)  mysql> create database ign; error 1044 (42000): access denied user ''@'localhost' database 'ign' 

i try running log sql.

mysql -u username -p enter password:  error 1045 (28000): access denied user 'username'@'localhost' (using password: yes) 

i lost , appreciated.

if installed , not know root password, or unsure of password, try resetting root password (assuming have admin rights on machine). create user , apply applicable grant permissions.

set password 'root'@'localhost' = password('mynewpass'); 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -