I'm writing script that, each night, copies a small database to my laptop on the local network. I'm having trouble getting it to work. Here's my syntax so far (run on the server):

mysqlimport --host=192.168.0.224 --user=root --password alba2 alba2_2009-03-10_00h45m.Tuesday.sql

Which produces:

---
mysqlimport: Error: 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 '-03-10_00h45m IGNORE 0 LINES' at line 1, when using table: alba2_2009-03-10_00h45m
---

The sql file is produced by automysqlbackup... Not sure what I'm missing, probably something obvious. Anyway, here's the first part of the sql file I want to import:

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version       5.0.67-log


/*!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 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


--
-- Create schema alba2
--

CREATE DATABASE IF NOT EXISTS alba2;
USE alba2;

--
-- Definition of table `alba2`.`accounts`
--

DROP TABLE IF EXISTS `alba2`.`accounts`;
CREATE TABLE  `alba2`.`accounts` (
  `id` smallint(5) unsigned NOT NULL auto_increment,
  `fp` varchar(40) NOT NULL,
  `created` int(10) unsigned NOT NULL default '0',
  `status` enum('Active','Inactive') NOT NULL default 'Active',
  `account_name` varchar(40) NOT NULL,
  `account_full_name` varchar(40) NOT NULL,
  `address` varchar(40) NOT NULL,
  `city` varchar(40) NOT NULL,
  `province` varchar(10) NOT NULL,
  `postcode` varchar(10) NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `alba2`.`accounts`
--


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to