Re: mysql dependancy problems.
Hi A.J.
Thank you for your response. The key thing was the mysql database, as you
said. I used the: mysql_install_db --user=mysql command to restore the
database after I mv'd the original out of the way. Once that was done, mysql
ran fine, thank you.
My problem now is phpmyadmin, as it complains about:
"Cannot load mysql extension"
Anyways, thanks again, and if anyone has any suggestions regarding this
problem, I think off list is probably appropriate.
Chris W.
On Thursday 23 March 2006 16:23, A J Stiles wrote:
> On Wednesday 22 Mar 2006 11:57, Chris Wakefield wrote:
> > Greetings all.
> >
> > I've managed to re-install mysql-server-5.0, mysql-client-5.0 and the
> > support libraries, etc. What is happening now is what prompted me to
> > uninstall 2 days ago, which is I mistakenly had phpmyadmin remove three
> > mysql users: root, a user and the debian system maintainer. The error
> > I'm getting is:
> >
> > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> > password: NO)
> >
> > Since I can't log in as root, how can I recreate these users?
>
> Oo-er!
>
> What's happened is you have messed up the `mysql` database; which is where
> mysql stores all its privilege information {in a database, naturally}.
> You need to restore this somehow.
>
> First of all, make a copy of the directory where mysql is storing its
> databases, this probably will be /var/lib/mysql unless you changed it.
>
> Next, uninstall and purge all the mysql packages; then reinstall them.
> This will create a brand new setup with a default `mysql` database.
>
> Then, stop mysql; copy the backup you made earlier to /var/lib/mysql {or
> wherever}, and restart mysql. It probably will complain and start up
> slowly, but should work. You might need to FLUSH PRIVILEGES and maybe even
> do some REPAIRs.
>
> Another method {if you have another computer or enough disk space to set
> up a temporary chroot} might be just to copy the mysql.frm, mysql.MYD and
> mysql.MYI files from a working mysql installation into /var/lib/mysql
> {while the server is stopped, if it is actually starting}. Then try
> starting the server.
>
> See also the mysql web site.
>
> --
> AJS
> delta echo bravo six four at earthshod dot co dot uk
Reply to: