BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: dragonjr on April 15, 2013, 03:02:40 am

Title: got a error while tring to back up the bot
Post by: dragonjr on April 15, 2013, 03:02:40 am
i did
mysqldump -uroot -p bebot > bebot.sql;
 and im getting this
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
dump -uroot -p bebot > bebot.sql
mysqldump -uroot -p bebot > bebot.sql' at line 1

am i doing something wrong?
Title: Re: got a error while tring to back up the bot
Post by: Glarawyn on April 15, 2013, 10:52:46 pm
mysqldump -u root -p bebot > bebot.sql

Add a space between u and root?
Title: Re: got a error while tring to back up the bot
Post by: dragonjr on April 15, 2013, 11:13:06 pm
ok i tried that idea and im still getting the same error
Title: Re: got a error while tring to back up the bot
Post by: Glarawyn on April 16, 2013, 01:18:38 am
From http://bebot.link/helpful-posts/mysql-n00b-help/msg2270/#msg2270:

mysqldump -u username -p --databases databasename --add-drop-table -a -f  > filename.sql
Title: Re: got a error while tring to back up the bot
Post by: dragonjr on April 16, 2013, 03:03:35 am
ok dont know if i spced every thing the right way i think i did and i got the same error

this is how it looked
Code: [Select]
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Chris>mysql -u root -p
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.50-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> mysqldump -u dragon -p --bebot --add-drop-table -a -f > bebotbackup.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
dump -u dragon -p --bebot --add-drop-table -a -f > bebotbackup.sql' at line 1
mysql>
Title: Re: got a error while tring to back up the bot
Post by: Glarawyn on April 16, 2013, 09:11:37 pm
Ah, I see the problem now. mysqldump is a separate program from mysql. So instead of running mysqldump in mysql, run it on it's own.

C:\Users\Chris>mysqldump -u username -p --databases databasename --add-drop-table -a -f  > filename.sql
Title: Re: got a error while tring to back up the bot
Post by: dragonjr on April 17, 2013, 01:03:15 am
 thank you very much for the help it worked this time.

now if i run into any problem and i need to restore or reenstall mysql  after i put it back to gether all i ahve to do is this comeand right

C:\Users\Chris>mysqldump -u username -p --databases databasename --add-drop-table -a -f  < filename.sql
Title: Re: got a error while tring to back up the bot
Post by: Glarawyn on April 19, 2013, 05:31:32 am
Nope, mysqldump is just for backing up. To restore:

mysql -u root -p databasename < backup.sql

Or something close to that.
Title: Re: got a error while tring to back up the bot
Post by: dragonjr on April 19, 2013, 12:15:04 pm
ok thank you very much for your help
SimplePortal 2.3.7 © 2008-2024, SimplePortal