Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

Moving a Slash Database

posted by Krow on 07:04 AM June 5th, 2001   Printer-friendly   Email story
robd writes "Here's a question for you all, how exactly do you move a Slash database? I've been playing with mysqldump and using the following to export my database:

mysqldump -uroot -p(not telling!!!) slash > slash-database

Is there anything wrong with that? Next I send that file to my new database server(running MySQL 3.23.28) and do the following:

mysqladmin -uroot -p(not telling!!!) create slash
mysql -uroot -p(not telling!!!) slash

Why won't this work? I'm upgrading(--err sorta downgrading) from MySQL 3.23.30-gamma if this makes any difference. Does anyone have any idea as to why it won't import that database? I've tried to see whats wrong by first off looking in the database's place where it keeps the database files(aka /usr/eps/mysql/var/slash for the slash database) no extra table files; I tried a common command to see if all tables were just put in one file(although very doubtful at the time) which was:

mysql -uroot -p(not telling!!!) slash
and then once in slash, select * from blocks;

Now in theory I should have gotten all the blocks flying by in the MySQL 'shell', but instead nothing. Anyone know why this won't work? Any simple sollutions? Please do let me know, 'cause I'm hoping I can resolve this problem within a week, so please do write!

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • Wouldn't you need to do:

    mysql -p {password} -u {user} -h {hostifneeded} mysqldatafiledump.sql

    lottadot []
  • by Anonymous Coward
    Actually, what you need to do is the following: mysql -p {password} -u {user} -h {hostifneeded} mysqldatafiledump.sql (the less than is crucial) This tells the shell to redirect the data file to the standard input of the MySQL client - running each line as if you had manually typed them in. choadburglar
  • by Anonymous Coward
    dammit, forgot to escape the less than... trying again. :> mysql -p {password} -u {user} -h {hostifneeded} < mysqldatafiledump.sql choadburglar
  • the left bracket isn't showing up. Slash is removing it with the filter. it should be

    mysql -p {password} -u {user} -h {hostifneeded} < mysqldatafiledump.sql
    lottadot []
  • by Anonymous Coward
    Don't you also need to specify the name of the database that the dumpfile is to be applied to? As in:

    mysql -p {password} -u {user} -h {hostifneeded} (databasename) < mysqldatafiledump.sql