Trying to import my db from a backup file. Getting the error message:
MySQL said:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'utf8' at line 1 ;
These are the first 30 lines of my db file
-- version 2.11.9.4
-- http://www.phpmyadmin.net
-- Host: 173.201.217.5
-- Generation Time: Dec 14, 2010 at 06:37 PM
-- Server version: 5.0.91
-- PHP Version: 5.2.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/!40101 SET NAMES utf8 */;
--
--
utf8;
--
-- Table structure for table access
DROP TABLE IF EXISTS access;
any help is appreciated.........

Comments
How did you make the backup?
How did you make the backup? I assume you are using phpmyadmin to import it now? Did you go from Unix to windows back to unix and mess up the format of the file (unix and windows use different methods to indicate new lines)
the problem seems to be with
utf8;
what's up with that? the format you pasted got all messed up by the input filter in drupal.. repost the first 30 lines within HTML pre tags and set the input format to "Filtered HTML -- No Markdown"
here is what one of my databases looks like
If you have shell access you can do the following to create a backup and then import it
shell> mysqldump db_name > backup-file.sql
shell> mysql db_name < backup-file.sql
more info on mysqldump:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
exported with phpadmin and
exported with phpadmin and then imported same. All done on a mac.
30 lines
exported with phpadmin then
exported with phpadmin then imported same. All done on a mac.
30 lines
I really don't know SQL well,
I really don't know SQL well, but if you copy the exported DB to a new temporary file remove the line that just has
utf8;
And then try the import, does it work?
I did exactly that and
I did exactly that and uploaded and my database has been restored, thank you. However, the problem that has now arisen..... When I try to access my site and configure using http//dcubedbuilders.com/drupal/ this is the error message I am getting
Fatal error: Call to undefined function node_load() in /home/content/m/a/r/markcissi/html/drupal/includes/menu.inc on line 410
I did go into settings.php and change the db that was there because it was not referencing the correct db.
How can I resolve this error if I can't access the site as an admin? One problem solved and another rears its head. Any help appreciated as always.
okay so you just removed the
okay so you just removed the line with
utf8;
and the db imported fine but now you're getting the undefined function error..
Are you sure the username and permissions set in settings.php are correct?
Are you migrating from one server to another? Are you sure you have all of the drupal installation migrated?
usernames/permissioins are
usernames/permissioins are good. Not going from one server to another. drupal install is all accounted for.
so what are you backing up
so what are you backing up from and restoring to exactly? ie if you aren't going from one server to another server, what changed?
I have no idea, hence the
I have no idea, hence the mystery. Backed up from godaddy, restored to the same. I am going crazy trying to figure out this error,
Fatal error: Call to undefined function node_load() in /home/content/m/a/r/markcissi/html/drupal/includes/menu.inc on line 410
but you backed up
but you backed up some_db_name to a file.. then imported it back over the original db? is that what you're saying?
I backed up my db, tried to
I backed up my db, tried to import it back after losing stuff. It did not overwrite anything. Did a re-install of drupal 6.19, the whole shebang.
this is line 410 from
this is line 410 from menu.inc
Are you dropping all the
Are you dropping all the tables (I drop and create the whole database) before restoring?
node_load is just a normal function out of /modules/node/node.module. It could mean the system table is messed up and the node module isn't enabled, or a cached version of the list of active modules isn't being loaded right, or the code is missing.
It looks like the settings
It looks like the settings should be in comment fields, but you're oddly matched.
In this you can see their are balanced comment open and close declaration.
btw, i don't use phpmyadmin at all for backups and recovery, there are too many problems.
I use
mysqldump
and "source filename" from the command line. Much more reliable.
-Don-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
-Don-
Take a look at the Backup and
Take a look at the Backup and Migrate module.
This module will allow you to backup your database from the Drupal administration section.
This is a standard module in all my projects
Good luck!