SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    changing MySQL user and password

    Just did a fresh install of MySQL (latest version) onto Redhat Linux 7.2, and it installed great from the server and client RPM files. Only problem is i tried changing the root password like in the tutorial from here:

    mysqladmin -u root password "newpassword"

    and i get back an error:

    "error: 'Access denied for user: 'root@localhost' (Using password: NO)'

    so i tried:

    mysqladmin -u root -p password
    and it asks for a password then, and i enter one, and once again i get the same error as before:
    "error: 'Access denied for user: 'root@localhost' (Using password: YES)'


    Tried all sorts of variations with mysqladmin password setting (with root as username and without, etc) and each time i get this access denied error. This is a fresh install (tried several fresh installs in fact), everything seems to work but this, it's like root doesn't exist to mysql or have access to change passwords for some reason. Any ideas?

  2. #2
    Are you ready for BSD? Marshall's Avatar
    Join Date
    Dec 2001
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any ideas?
    Your installation may automatically configure MySQL with a default root password. Where did you get the source, and what does the documentation say?

    - Marshall

  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yah, the RPM install seemed to automatically do a lot of things (put startup files into the startup directory, set permissions, and even got the test database set up), however, as far as i can tell from the documentation, root should be the superuser for the database with no password set initially. I got mysql straight from the download area on mysql.com, the latest client and server version (didn't install the performance testing rpm). I noticed in a post up above that maybe mysql doesn't like users from @localhost possibly? which is what my server is running as currently.

  4. #4
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ahh, think I found the trick

    For some reason it wants me to be very specific when using any mysql commands as to what server i'm talking about by using the -h command line option. This appears to work setting the root password:

    mysqladmin -u root -h localhost.localdomain -p password "newpassword"

    and now I can look at databases and use mysqladmin stuff if i add that -h bit like so:

    mysqladmin -u root -h localhost.localdomain -p version

    just posting this so if anyone else runs into the same problem maybe this will help them.

  5. #5
    SitePoint Member
    Join Date
    Mar 2002
    Location
    Park City, UT
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    reset password ? start over

    I to am having this trouble. I can access mysql and delete a database, but when I try and add one it says not for annon. users.

    When I try to login with what I thought my password was it give me the same responces as above. I'm using os x. I thought I did in fact set the original password.

    Is there a way to veto this password, or globally reset it, I have no data I need in my system, it was just set up to learn on, but uninstalling and reinstalling seem awfully challenging in and of itself.

    Any help will be greatly appreciated as I am eagerly waiting to be able to go through my new book "kevin's" using php and mysql, but I can't create my first db. Cheers
    Dustin Garrett



  6. #6
    SitePoint Member
    Join Date
    Mar 2002
    Location
    Park City, UT
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I think I have the password I just cant login?

    after performing a

    mysqladmin -u root -p status

    and entered the password it gave me a status report which leaves me to believe that I have the correct root password, but I can't login as a user to work with the database, any advice here? In os x you set up a user as mysql??? If that help at all
    Dustin Garrett




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
  •