Solved

How can i finish this import in the current syntax

Posted on 2007-03-22
2
370 Views
Last Modified: 2009-12-16
windows Mysql 5 ;  http://www.cacti.net/downloads/docs/html/install_windows.html

mysql> CREATE DATABASE cacti;
mysql> mysql -u root -p cacti < c:\apache2\cacti\cacti.sql
ERROR:
Unknown command '\a'.
    -> ;
ERROR 1064 (42000): 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 'acti.
sql' at line 1
mysql>
mysql> mysql -u root -p cacti <cacti.sql
    -> ;
ERROR 1064 (42000): 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 'mysql
 -u root -p cacti <cacti.sql' at line 1
mysql>
0
Comment
Question by:sunrise9s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18772047
you have to quit MySQL command line to run that command:
mysql> CREATE DATABASE cacti;
mysql> exit;
os> mysql -u root -p cacti < c:\apache2\cacti\cacti.sql

0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 18772059
alternative: use the SOURCE command:

http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html

mysql> CREATE DATABASE cacti;
mysql> source -u root -p cacti < c:\apache2\cacti\cacti.sql
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to send multiple emails at the same time in PHP 12 90
MySQL limit and not so limited 13 62
Use Select Query to Return Results as a Form 9 58
Mysql query one to many 11 42
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Creating and Managing Databases with phpMyAdmin in cPanel.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question