First a warning: The process I followed is kind of messed up because I don't really know what I'm doing.
We got a message from our server that we had too many database tables and our website would be taken off line if I didn't fix that. I didn't know how to find out what database was what but when I looked at "my installs" it said what program was using what database (except I found out it doesn't point to the actual database in use, it points to the database that was installed for the program, I didn't know about the config.php yet at that point) so I deleted a bunch of databases to include the one that moodle was using.
I thought I had to start over form scratch because of this mistake so I uninstalled the moodle and I reinstalled a new one.
Then I remembered that there were backups on the server so I went there and tried to reinstall the deleted database so I could at least recover the data. Next I put in the old config.php but that didn't work, the moodle gave me an error message (I don't remember what) that I didn't understand so I deleted the install and reinstalled yet an other moodle.
I then went to "phpMyAdmin" found the old database and I did "export" to tmp folder on the server. next I went to the database that the new install is pointing too (still in phpMyAdmin) and I did import from the tmp folder. At this point I can see all the data in this database. The users, the courses, the logs, the forum discussions, the homework,... it all shows in the database that the config.php is pointing to. When I log into moodle, however, it still looks like a "virgin" no courses, users, forum,... but no error messages either.
There is a moodledata folder on the server too but I just looked in there and I can't see anything that seems to refer to the databases, at least not in a way that I recognise.
Also, the old database, that I recovered from the backup doesn't show up in the list of "my databases", it shows up in the list of the "users" that is probably why the old config.php doesn't work but I don't know how to get it out of the users and into the list of "my databases". We used to have a webmistress who knew what she was doing but one day she just stopped, it is as if she fell of the face of the earth and we have no idea what or why. since then I have been trying to keep things going but I feel pretty desperate at this point. I really don't know what I'm doing but I seem to be the only one brave enough to at least try so everyone is looking at me but I don't know, I might have messed this up beyond repair