SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Mar 19, 2001, 09:01 #1
- Join Date
- Jan 2001
- Posts
- 63
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would like to know, lets say I have a few tables with username\password info in it and I would like to carry that info around with me in a form of .sql, can it be done?
How?
-
Mar 19, 2001, 10:56 #2
- Join Date
- Nov 2000
- Location
- London, UK
- Posts
- 223
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sure ..
PHPMyAdmin has a dump table function you can use. It'll even send it as a download (which is probably the best). Or you can just have it dump the whole database.
Otherwise, you can write a simple PHP script that'll output everything in a comma delimited format or something like that .. email/post for an example
... what's the world coming to?
-
Mar 19, 2001, 11:29 #3
- Join Date
- Jan 2001
- Location
- Your basement
- Posts
- 192
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
man mysqldump
mysqldump -p databasename optionaltablenames > file.sql
Lots of options on the dump command.. OPT is usually a good idea, also lock the tables, and a few other things. to read it back in:
mysql -p < file.sqlOvergrow the Government: The Edge Forums
presented by Overgrow Marijuana Magazine
*warning: adult content
-
Mar 19, 2001, 16:40 #4
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
.sql is not a specific extension in this case if the file only contains SQL query
I can name it: "backup.sql", "backup.txt" or just "backup"
All contains the same thing: TEXT
However, if there is .sql which aren't contain SQL query or it's a binary file then that's a different story.- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
-
Mar 21, 2001, 08:27 #5
- Join Date
- Jan 2001
- Location
- Lisboa : Portugal
- Posts
- 418
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm also really interested in this one. I have a db called liruxdb; After reading this post, I supose all I'd need to do is:
1: Login using telnet
3: type :
mysqldump -p liruxdb > file.sql
Type no table names becouse I want them all backed up
4: be prompted for my password ant type it in
6: close telnet
7: Login to FTP and download my file
is this right? Don't I need to start mysql (mysql -u username -p)?
Thanks 4 Ur help ppl!Duarte Carrilho da Graça
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
-
Mar 21, 2001, 10:16 #6
- Join Date
- Aug 2000
- Location
- Silicon Valley
- Posts
- 2,241
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You need your user name and to obtain the fastest dump, use --opt
mysqldump --opt -u usr -p DBNAME > file.sql- Son Nguyen
AdSpeed.com - Ad Serving and Ad Management Made Easy
-
Mar 21, 2001, 10:21 #7
- Join Date
- Jan 2001
- Location
- Lisboa : Portugal
- Posts
- 418
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks son
Duarte Carrilho da Graça
RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
Bookmarks