Page 1 of 1

mysql root password- Solved

Posted: Tue Jul 28, 2009 8:53 pm
by weekendsrule33
I have been having problems with the root password of mysql, causing a 500 internal server error. I have tried to change the user/password back to root/hda, but when i save it, it keeps a copy of the old one with the same file name, just with a ~ at the end. I think that file is still overriding the updated one, still causing the error. When i tried to go and delete it, i wasn;t there, but when i go into terminal as root and do gedit, when i hit open, there it is listed as a file. And i can't delete it. Any suggestions. Feel free to ask for more details, as it was kind of hard to explain my situation clearly.

Re: mysql root password

Posted: Tue Jul 28, 2009 9:01 pm
by cpg
when you type this command:

Code: Select all

grep -A4 production: /var/hda/platform/html/config/database.yml
you should see this exactly:

Code: Select all

bash$ grep -A4 production: /var/hda/platform/html/config/database.yml production: adapter: mysql database: demo_development username: root password: hda bash$
and your mysql server should also have as the root password hda.

sorry, having a different root password is not supported at the moment. (i know, it's silly)

the files with ~ at the end are editor backups and do not matter.

Re: mysql root password

Posted: Tue Jul 28, 2009 9:14 pm
by weekendsrule33
ok so i entered that into the terminal and got back the right response, but i am still getting the error screen. Is there a way to uninstall and reinstall amahi without reinstalling fedora?

Re: mysql root password

Posted: Tue Jul 28, 2009 9:22 pm
by cpg
did you change the password in the server?
if so, it needs to be back to hda.

if not, try to restart the http daemon:

Code: Select all

service httpd restart

Re: mysql root password

Posted: Tue Jul 28, 2009 10:11 pm
by weekendsrule33
how would i check/change the root mysql server password? I don't think i ever changed it, mainly becasue i don't think i know how, but how would i change it?

Re: mysql root password

Posted: Tue Jul 28, 2009 10:18 pm
by cpg
with phpmyadmin?
(also through mysqladmin)

does this work?:

Code: Select all

echo "show tables" | mysql -u root -p hda demo_development
i assume you restarted the httpd server.

Re: mysql root password

Posted: Wed Jul 29, 2009 1:27 am
by weekendsrule33
I get a message access denied for user root@localhost using password yes. And yes, i did restart the httpd server.

Re: mysql root password

Posted: Wed Jul 29, 2009 9:37 am
by cpg
I get a message access denied for user root@localhost using password yes.
in that case, it looks like the root password in mysql is not hda :(

you can try to change it back to hda with mysqladmin like this:

Code: Select all

mysqladmin -u root -p password 'hda'
(it will ask you for the old password, so you can try various possibilities)

sorry you are experiencing so much trouble. it's hard to warn about this particular issue cause 99% of people do not care about their mysql settings or root password in general and we need a root-like user for amahi to be able to create databases, etc. which we will do that in the next release.

Re: mysql root password

Posted: Wed Jul 29, 2009 11:25 am
by bigfoot65
weekendsrule33,

One thing I notice in your syntax is that there is a space after the -u, but not after the -p. It's been my experience that they have to be the same or you will get that message.

My guess is it should be mysql -u root -p hda. I have had this same issue in the past and that was my problem.

Hope this helps.

Re: mysql root password

Posted: Wed Jul 29, 2009 1:57 pm
by weekendsrule33
i changed the mysql password (after guessing the old one about fifteen times :lol: ), and it is working now. Thanks for all your help cpg, and thanks for your input too bigfoot65. Can't wait to see what the future holds for amahi!