PDA

Bekijk de volledige versie : mysql: dropped localhost, created new, but not the same



raas
05-01-2008, 13:49
Hi Guys,


I'm experiencing a strange problem here.

I accidently dropped the localhost database from mysql in phpmyadmin.
(I wanted to delete some tables, but then hitted the wrong button. damn.)

Well, nothing serious was stored in that database, so I thought I just recreate it by running create database 'localhost'. the code executes and again I have a database called localhost.
I can create tables in the database and the root user has 'all privileges' to the database.

Now,

When I want to install a CMS like modxcms, joomla, dixit etc.etc. I al gives me a message that it can't connect to the localhost database.
I've rebooted and checked persmissions, but all seems fine to me,

Does anyone have a clue what the localhost database might be missing ?
Or how do I create a new database localhost which is the same as the standard installed database?

Thanks,


EDIT:

this is the message I'm getting in my browser:


Database error: Link_ID == false, connect failed
MySQL error: 0 () Session halted.

avberk
06-01-2008, 15:39
Check your mysql data directory. If you open /opt/etc/init.d/S70mysqld you
will see where it is.

Probably:

/opt/var/lib/mysql

There you will see your databases.

I would delete all references to 'localhost' database here and try again.
(just a thought)

raas
06-01-2008, 15:44
Hi, thanks for your reply.

yeah, i've already looked up the path to the database. and deleted it, started over again. same result.

On another harddrive I had a copy (image of /opt) of about 2 weeks old.
hooked that up, and copied the localhost db from that drive, to my current drive... still. the same result,

So I thought.. why not copy the whole mysql directory (including system databases.. ).. the result even worse... the engine doesn't run anymore.

i will try to delete all the mysql information and install it again.

otherwise I have to restore the image I have (which is not that big of deal. )

raas
06-01-2008, 21:56
I installed the image on to another drive first just to make sure.
mysql didn't run also.


I've removed and reinstalled mysql again. now everything is working again. cms / phpmyadmin can access the database again.