Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can i finish this import in the current syntax

Posted on 2007-03-22
2
Medium Priority
?
386 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 500 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

688 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