Hello, I'm using Drupal 6.2 locally. Recently, my MySQL installation went weird on me, and I had to do a clean install of it. Unfortunately, I forgot to backup my Drupal database, so now it's gone. I tried opening my website, and well... it returns the following messages:

Warning: Table 'drupaltest.access' doesn't exist query: SELECT 1 FROM access WHERE type = 'host' AND LOWER('127.0.0.1') LIKE LOWER(mask) AND status = 0 LIMIT 0, 1 in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Warning: Table 'drupaltest.users' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'v4bjd7u62fputienft4j8b0aq0' in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Warning: Table 'drupaltest.cache' doesn't exist query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Warning: Table 'drupaltest.variable' doesn't exist query: SELECT * FROM variable in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Notice: Undefined variable: variables in C:\Web_Sites\drupaltest\includes\bootstrap.inc on line 427

Warning: Table 'drupaltest.cache' doesn't exist query: UPDATE cache SET data = '', created = 1209537403, expire = 0, headers = '', serialized = 0 WHERE cid = 'variables' in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Notice: Undefined variable: variables in C:\Web_Sites\drupaltest\includes\bootstrap.inc on line 434

Warning: Table 'drupaltest.system' doesn't exist query: SELECT name, filename, throttle FROM system WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

Warning: Table 'drupaltest.url_alias' doesn't exist query: SELECT COUNT(pid) FROM url_alias in C:\Web_Sites\drupaltest\includes\database.mysqli.inc on line 128

How do I recreate the database? (sorry, I was dumb not to do regular database backups before the clean install.)

Comments

curagea’s picture

I created a new database with the same name as the old one, by the way, and followed the instructions in INSTALL.mysql.txt. But it still gives me those warnings and notices.

Horla’s picture

Do you mean that you want to recreate the database of an existing website? With news, forum posts, etc? I believe it can't be done. You can create the database but the table's and content can't be created out of nowhere.

curagea’s picture

Well, the content of the database is gone, so I know I can't do anything about that. I just want to set up the database and make sure Drupal can at least access it (and then do something about the content later), that's all. But I keep getting those errors even after I created the new database. Is it because there's just nothing in the database, so that's why it doesn't work? Or Drupal is looking in the wrong place? Or... something else entirely.

Uersu’s picture

I just ran into a similar problem and I guess the issue is something that I found in an older post: "This happens if you have already edited the $db_url variable in settings.php. The installer will no longer be automatically invoked, because Drupal assumes installation has already been completed."

So, comment out this line in your settings.php and the installer should get correctly started again.

hope this helps

Urs