mySQL error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • c_chen

    #1

    mySQL error

    Hi, i am a beginner in PHP and mySQL.
    Whenever I try to connect my php and mysql
    database, i get this error.:
    MySQL error : access denied for myuser@localhos t (Using password:yes)

    I have created a database called mydatabase at the SQLmonitor,
    mySQL> create database mydatabase;

    then i try to grant the access to mydatabase by
    mySQL>GRANT usage on mydatabase.* to myuser@localhos t;
    mySQL>GRANT ALL PRIVILEGES on mydatabase.* to myuser@localhos t;
    mySQL>exit
    mySQL>SET PASSWORD FOR myuser = Password('hello world');
    I modified the php file with the database username as myuser, password as
    helloworld,
    host as localhost, database name as mydatabase.

    Please advice as to how i can avoid having problems of access denied above.
    thank you.
    zhen





  • harly

    #2
    Re: mySQL error

    I have the same problem
    I try to improve the security on the mysql and now I can't get into it.
    I get this massage.

    “Access denied for user: '@localhost' to database 'mysql' ”

    Is the same throw webmin or phpMyAdmin

    Can anybody please help

    I’m runnin Redhat 7.3 and mysql 3.23.56


    /harly

    c_chen wrote:
    [color=blue]
    > Hi, i am a beginner in PHP and mySQL.
    > Whenever I try to connect my php and mysql
    > database, i get this error.:
    > MySQL error : access denied for myuser@localhos t (Using password:yes)
    >
    > I have created a database called mydatabase at the SQLmonitor,
    > mySQL> create database mydatabase;
    >
    > then i try to grant the access to mydatabase by
    > mySQL>GRANT usage on mydatabase.* to myuser@localhos t;
    > mySQL>GRANT ALL PRIVILEGES on mydatabase.* to myuser@localhos t;
    > mySQL>exit
    > mySQL>SET PASSWORD FOR myuser = Password('hello world');
    > I modified the php file with the database username as myuser, password as
    > helloworld,
    > host as localhost, database name as mydatabase.
    >
    > Please advice as to how i can avoid having problems of access denied above.
    > thank you.
    > zhen
    >
    >
    >
    >
    >[/color]

    Comment

    • harly

      #3
      Re: mySQL error

      I have the same problem
      I try to improve the security on the mysql and now I can't get into it.
      I get this massage.

      “Access denied for user: '@localhost' to database 'mysql' ”

      Is the same throw webmin or phpMyAdmin

      Can anybody please help

      I’m runnin Redhat 7.3 and mysql 3.23.56


      /harly

      c_chen wrote:
      [color=blue]
      > Hi, i am a beginner in PHP and mySQL.
      > Whenever I try to connect my php and mysql
      > database, i get this error.:
      > MySQL error : access denied for myuser@localhos t (Using password:yes)
      >
      > I have created a database called mydatabase at the SQLmonitor,
      > mySQL> create database mydatabase;
      >
      > then i try to grant the access to mydatabase by
      > mySQL>GRANT usage on mydatabase.* to myuser@localhos t;
      > mySQL>GRANT ALL PRIVILEGES on mydatabase.* to myuser@localhos t;
      > mySQL>exit
      > mySQL>SET PASSWORD FOR myuser = Password('hello world');
      > I modified the php file with the database username as myuser, password as
      > helloworld,
      > host as localhost, database name as mydatabase.
      >
      > Please advice as to how i can avoid having problems of access denied above.
      > thank you.
      > zhen
      >
      >
      >
      >
      >[/color]

      Comment

      • harly

        #4
        Re: mySQL error

        I have the same problem
        I try to improve the security on the mysql and now I can't get into it.
        I get this massage.

        “Access denied for user: '@localhost' to database 'mysql' ”

        Is the same throw webmin or phpMyAdmin

        Can anybody please help

        I’m runnin Redhat 7.3 and mysql 3.23.56


        /harly

        c_chen wrote:
        [color=blue]
        > Hi, i am a beginner in PHP and mySQL.
        > Whenever I try to connect my php and mysql
        > database, i get this error.:
        > MySQL error : access denied for myuser@localhos t (Using password:yes)
        >
        > I have created a database called mydatabase at the SQLmonitor,
        > mySQL> create database mydatabase;
        >
        > then i try to grant the access to mydatabase by
        > mySQL>GRANT usage on mydatabase.* to myuser@localhos t;
        > mySQL>GRANT ALL PRIVILEGES on mydatabase.* to myuser@localhos t;
        > mySQL>exit
        > mySQL>SET PASSWORD FOR myuser = Password('hello world');
        > I modified the php file with the database username as myuser, password as
        > helloworld,
        > host as localhost, database name as mydatabase.
        >
        > Please advice as to how i can avoid having problems of access denied above.
        > thank you.
        > zhen
        >
        >
        >
        >
        >[/color]

        Comment

        Working...