collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: got a error while tring to back up the bot  (Read 10538 times)

0 Members and 2 Guests are viewing this topic.

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
got a error while tring to back up the bot
« 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?

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #1 on: April 15, 2013, 10:52:46 pm »
mysqldump -u root -p bebot > bebot.sql

Add a space between u and root?

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #2 on: April 15, 2013, 11:13:06 pm »
ok i tried that idea and im still getting the same error

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #3 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

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #4 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>

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #5 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

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #6 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
« Last Edit: April 17, 2013, 03:03:29 am by dragonjr »

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #7 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.

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
Re: got a error while tring to back up the bot
« Reply #8 on: April 19, 2013, 12:15:04 pm »
ok thank you very much for your help

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 373
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal