SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member ahmed momtaz's Avatar
    Join Date
    Dec 2003
    Location
    egypt
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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'

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    London
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    SitePoint Member ahmed momtaz's Avatar
    Join Date
    Dec 2003
    Location
    egypt
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi anigel

    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 ......
    ahmed

  4. #4
    SitePoint Member ahmed momtaz's Avatar
    Join Date
    Dec 2003
    Location
    egypt
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for lilleman ;

    the solution is :

    1- c:\ cd mysql\bin

    2- mysql -h localhost -u root

    3- no error 1044


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •