Uploading MySQL

I’m brand new to DH and trying out everything. One of the things from my old site is an existing MySQL database. I saved a dump of the whole database (not that big), which I uploaded to my server. I created the database with the following information:

DB name: jpdeni_genealogy
DB hostname: jpd-gen.jpdeni.com
DB username: jpdeni_deni
DB password: xxxxx (I’m not going to tell! :slight_smile:

In the Knowledge base here, it says to use the following from within the shell to insert a database:


I went to the shell and entered

mysqlimport -L -hjpd-gen.jpdeni.com -ujpdeni_deni -pxxxxx jpdeni_genealogy /home/jpdenico/jpdeni.com/jpdeni_genealogy.sql

I got the following error:

Error: Table ‘jpdeni_genealogy.jpdeni_genealogy’ doesn’t exist, when using table: jpdeni_genealogy

The text file has the information for creating the table (there’s only one in this database). The name of the database is “jpdeni_genealogy”. The name of the table is supposed to be “stories”.

What am I doing wrong?

Ain’t it always the way? As soon as I ask the question, I find the answer myself.

The correct syntax for dumping an entire database seems to be

mysql -hHOSTNAME -uUSER -pPASSWORD DATABASE < /path/to/file.sql

At least that didn’t give me any error messages. Once my domain name is propogated I’ll be able to find out if it actually worked. :smiley:

You can always login to mysql through the shell and do a few select commands

That would be a good idea. I wish I knew enough about the shell and MySQL to be able to figure out how to do it. :smiley:

I’ll give it a shot, though.

Edited to add—

I got it! Yay!! It works!!! (I think I’m going to have to go buy some more exclamation marks, though. I’m using quite a few.)

Glad everything is working for you.
Most people don’t get as far as the Kbase to look at those backup/restore articles. Surprised the no space between -h and hostname works. I know the -pPASSWORD can’t have a space. Didn’t know about the other switches :). Learning something new everyday.