Find the answer to your Linux question:
Results 1 to 7 of 7
This is what happenned. I was creating the root user and adding a password... when I hit enter key, my computer freezed. So, I press the button to reboot. Now ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Posts
    50

    someone please help me


    This is what happenned. I was creating the root user and adding a password... when I hit enter key, my computer freezed. So, I press the button to reboot. Now when I try to create the admin user with this command:

    mysqladmin –u root password ‘mypassword’

    I get this error:

    unable to change password; error: 'Access denied for user: '@localhost' to database 'mysql'

    What should I do???? I tried running "mysql_install_db" already. I lost access to the mysql server. Only thing I can do now is to start and stop the service. Someone please help.

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    reset the root password, follow instructions here:
    http://www.mysql.com/doc/en/Resetting_permissions.html

    Jason

  3. #3
    Just Joined!
    Join Date
    Jun 2003
    Posts
    50
    thanks for helping... but i can't seem to be able to kill the .pid file. I don't know why everytime I kill it I will get a response "no such pid" my pid file is in the /var/run/mysqld folder, and the name of the file is "mysqld.pid" I just don't get it... driving me nuts!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Heh, that is just the file that the pid is stored in. A pid is a process id which is a number.
    ps ax | grep mysql <- that would give you the pid of mysql which is the numer in the first col. There is also killall command which can work like this:
    killall mysqld which would kill all of them. Depending on your distro, you could also have an init script which you should use to stop it.
    /etc/init.d/mysql stop or something similar.

  6. #5
    Just Joined!
    Join Date
    Jun 2003
    Posts
    50
    Okay, I was able to use the "killall mysqld". Next, I restarted mysql by "service mysqld start -Sg". I type "mysqladmin -u root password secret" and I still get the error:
    unable to change password; error: 'Access denied for user: '@localhost' to database 'mysql'

    I also did some more research and found this:

    http://www.experts-exchange.com/CXO/..._20412490.html

    That is exactly my problem... sight, do I need to uninstall and reinstall mysql?

  7. #6
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Stopping mysql then running mysql_install_db then starting it should reset your password since that will overwrite your mysql db which holds your permissions.

  8. #7
    Just Joined!
    Join Date
    Jun 2003
    Posts
    50
    I already tried that. That didn't work. Anyway, I think I am completely goofed. I was trying to rebuild my 'mysql' database by deleting all the files in the mysql data base folder and rebuild everything by running mysql_install_db. But, the only problem now is that there is no such command for mysql_install_db. Showhow that command is tight to that data base folder... guess my only way out is remove the whole package and resinstall.

Posting Permissions

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