ERROR 1044: Access denied for user: '@%' to database
Mysql works Ok in php, but I cannot get it to work from a command line (does not connect to the dbase)
if "create database ahmed"
this msg says "ERROR 1044: Access denied for user: '@%' to database 'ahmed'
I am assuming you have removed the username from teh error message there?
Are you connecting to a mysql server on the same box as your command line? if so try adding another grant for user@localhost as well as user@%
I have had the same problems myself before where % (any) as a hostname has meant I could connect from other boxes but not from localhost
thanks for ur help.
but i didn't remove username from error msg.
in mysql manual they said: make a file name "windows\hosts"
and put this line " 127.0.0.1 localhost". but i don't know is it ".ini" file or what.
sorry my english somtimes ......
thanks for lilleman ;
the solution is :
1- c:\ cd mysql\bin
2- mysql -h localhost -u root
3- no error 1044