Gossamer Forum
Home : Products : Others : MySQLMan :

Help a confused person....

Quote Reply
Help a confused person....
Folks,
I'm new to all this MySQL business, so apologies in advance if I sound like a dunce. I'm currently setting up a copy of the vBulletin forum software, and was advised to download MySQLMan as an admin tool.

I am at the stage where I need to backup my database before testing some changes. Unfortunately, I can for the life of me work out how to do this with MySQLMan :( I can see how an individual table is backed up, but even there I have problems - what do I enter into the 'file name' field ? If I simply enter a filesname such as 'backup.txt' then nothing happens - I never see that file on the server (where did it go ?) or if I enter a full path to the location I wish to store the backup file, I get a permission refused type error.

What am I doing wrong folks ?

Craig.

Quote Reply
Re: Help a confused person.... In reply to
Hi Craig,

(Haven't seen you around for a while!). The backup/restore is just a frontend for mysql's LOAD DATA INFILE and SELECT INTO OUTFILE commands. You can see the docs at:

http://www.mysql.com/...rence.html#LOAD_DATA

As for pathnames:

In Reply To:
When locating files on the server host, the server uses the following rules:

If an absolute pathname is given, the server uses the pathname as is.
If a relative pathname with one or more leading components is given, the server searches for the file relative to the server's data directory.
If a filename with no leading components is given, the server looks for the file in the database directory of the current database.

Note that these rules mean a file given as `./myfile.txt' is read from the server's data directory, whereas a file given as `myfile.txt' is read from the database directory of the current database.
So, in your case, when you didn't put a path it was saving it off the current database directory (usually /usr/local/mysql/data/yourdatabase/myfile.txt). If you put the full path, then the mysql server needs to be able to create that file. If you are stuck try '/tmp/backup.txt' and then remove the file once you are done.

For a whole database, you might want to use the mysqldump utility that comes with mysql.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Help a confused person.... In reply to
Thanks Alex - i've not /been/ around for a while! Have been making much use of Links 2.0 though - to the point that I was thrown off my old server for abusing their CPU! :D Oh well... Anyway, I must register at least one of my installs with you as the site is finally starting to generate a small amount of income from banner ads, so I guess we're classed as 'commercial' now.

I'll have a words with my host as soon as poss and refer him to this thread if he has any queries. A very handy little tool there - I accidently corrupted the only username on my new forum which had admin priviledges - kinda dumb, huh ? - but was able to regain control by using MySQLMan to login and edit the record in the users table. A lifesaver!