Solved

How can i finish this import in the current syntax

Posted on 2007-03-22
2
338 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
  • 2
2 Comments
 
LVL 142

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 142

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now