PDA

View Full Version : Can't reset mysql root password


paul386291
03-13-2010, 02:21 AM
Hi there

I'm going crazy trying to reset the mysql root password. I've read plenty of articles on how to do it, but any suggested commands that I enter in terminal don't work.

I can't even access mysql in terminal.

Below are just some of the messages:

Last login: Mon Mar 8 17:34:00 on console
Welcome to Darwin!
paul-dodsons-Computer:~ pauldodson$ /usr/local/mysql/bin/mysql-root
-bash: /usr/local/mysql/bin/mysql-root: No such file or directory
paul-dodsons-Computer:~ pauldodson$ man sharing
No manual entry for sharing
paul-dodsons-Computer:~ pauldodson$ kill `cat /mysql-data-directory/host_name.pid`
cat: /mysql-data-directory/host_name.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
paul-dodsons-Computer:~ pauldodson$ mysqld_safe --init-file=/home/me/mysql-init &
[1] 2422
paul-dodsons-Computer:~ pauldodson$ -bash: mysqld_safe: command not found
mysql
-bash: mysql: command not found
[1]+ Exit 127 mysqld_safe --init-file=/home/me/mysql-init
paul-dodsons-Computer:~ pauldodson$
paul-dodsons-Computer:~ pauldodson$ mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass')
-bash: syntax error near unexpected token `('
paul-dodsons-Computer:~ pauldodson$ -> WHERE User='root';
-bash: -: command not found
paul-dodsons-Computer:~ pauldodson$ mysql> FLUSH PRIVILEGES;
-bash: mysql: command not found
paul-dodsons-Computer:~ pauldodson$

Can anyone PLEASE help with this before I go insane.

Thank you.

Paul

neilo
03-13-2010, 12:35 PM
Hi Paul,

'Trying to reset' your mysql root password. Does this mean that you don't have your original password?

Did you set an original password, or was MySql set up without entering a password?

What testing server are you using, i.e. IIS, Wamp, Xampp?

mrobben375515
03-24-2010, 11:27 AM
I am having same problem. I am on WAMP.

neilo
03-24-2010, 12:17 PM
Hiya,

Same question to you, - Did you set a password during the MySql part of the WAMP install? In other words, did you enter one but forget it, or do you have a MySql installation with no password set yet? By default, the WAMP MySql setup doesn't ask you to specify a password!