0

How can I change the password of phpMyAdmin on Mac 10.7.5?

I tried with this: http://en.kioskea.net/faq/630-mysql-reset-the-root-password

But I get this error: -bash: syntax error near unexpected token(`

Any ideas?

enter image description here

  • Looks like you tried to execute the `UPDATE` statement before you started `mysql mysql -u root`, or else that command failed. If mysql failed to start it would be interesting to know whether you received some error message. – fvu May 06 '13 at 22:21
  • Yeah, its after the `UPDATE`. But I put it after I entered `# mysql mysql -u root` and then I got nothing, no error but it just doesn't say nothing. I added image of what I'm doing –  May 06 '13 at 22:22

2 Answers2

0

This should help you out: https://superuser.com/questions/123275/how-do-i-reset-my-root-password-on-mysql-on-a-mac

Let me know if you have any more questions.

Community
  • 1
  • 1
NMALKO
  • 168
  • 1
  • 7
0

The blog post states:

# mysql mysql -u root

However, the # sign represents the prompt. If you add it in front of a bash command line, bash will consider evertything behind it as comments, and thus not execute it. So, just run

mysql mysql -u root

and the mysql command should start. On our dbserver this is what a started mysql command looks like:

host:~ # mysql mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6171
Server version: 5.1.49-log SUSE MySQL RPM

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

It should look quite similar on your machine once started, based on the info below you should start it this way to select the correct database:

/usr/local/mysql/bin/mysql mysql -u root

Granted, it's quite confusing with all these 'mysql' in that command line :-) To simplify your work you should add /usr/local/mysql/bin/ to your path permanently, explanation can be found here

Community
  • 1
  • 1
fvu
  • 32,488
  • 6
  • 61
  • 79
  • I put it that way and got this error `-bash: mysql: command not found` –  May 06 '13 at 22:32
  • ah.... I don't do Mac so I don't have any idea where you might find the mysql program, but from what I read with the official package its full path should be `/usr/local/mysql/bin/mysql` - see [here](http://superuser.com/questions/330338/where-is-mysql-installed-on-mac) – fvu May 06 '13 at 22:38
  • Yeah! I got connected that way to the mysql, but I still get an error when putting the line to change the pass. See my edit in the question –  May 06 '13 at 22:43
  • Added some info to my reply – fvu May 06 '13 at 22:56