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: My Sql storage location?  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

Offline Ricky1252

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
My Sql storage location?
« on: August 28, 2010, 02:57:59 pm »
ok i know iv been asking alot of weird questions D= but if i ever wanted to format my computer where would the mysql storage be? program files/mysql ? or somewhere more intresting? thanks for shairing your knowledge in advanced ^_^

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: My Sql storage location?
« Reply #1 on: August 30, 2010, 03:53:55 am »
Best option would be to backup your database regularly using MySQL dump. You can't just grab the MySQL files and restore them and expect them to work. It takes a bit more than that.

Run:
mysqldump --add-drop-table --all-databases -u username -p > mysql-backup.sql

On my Linux system I've setup a cron job to backup my databases nightly and compress the results. They then get backed up into the cloud by my backup system.

Backup is good. :D

Offline Ricky1252

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: My Sql storage location?
« Reply #2 on: September 08, 2010, 01:40:34 am »
sorry my video card went out xD do u think u can type in exactly what to say in cmd? i typed what u said but i couldnt quite figure out what i was doing wrong... also how do you use the file to put back in the database?

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: My Sql storage location?
« Reply #3 on: September 08, 2010, 05:14:48 am »
You really should read the documentation to understand what you're doing.

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Here's the command I run:
mysqldump --add-drop-table database_name -u mysql_username -p > database_name.sql

To restore:
mysql -u mysql_username -p database_name < database_name.sql

Offline Ricky1252

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: My Sql storage location?
« Reply #4 on: September 19, 2010, 03:37:31 am »
im still not sure why but it just wont dump... i just dont understand why it wont work its making me angry D= i looked at ur link and tried a few different things but it just doesnt do anything and i have no idea why....im using vs mysql vr 5.1 if that makes any difference

Offline Ricky1252

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: My Sql storage location?
« Reply #5 on: September 20, 2010, 01:41:54 am »
alright i finnly figured out what i was doing wrong... pritty much you have to run cmd in the proper folder i was using the mysql cmd if anyone else has this problem pritty much just make a cmd file in c:\program files\mysql\mysql server 5.1\bin    then type in the command noted by glarawyn ^_^ sorry thanks for all the help glarawyn i guess i just pulled a stupid xD

 

* 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: 216
  • 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