RE: [PHP] Dumped OK, Restore NOT
| From: | Nicolas Guilhot | Date: | Wed, 05 Dec 2001 17:13:21 +0000 |
| Subject: | RE: [PHP] Dumped OK, Restore NOT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76747@lists.php.net to get a copy of this message | ||
Maybe you can try to launch the sql dump file from the SQL shell, not
directly from the command line. I think it will give you more feedback about
what is going on.
Go to the directory where you have your smarts.sql file.
Just type "mysql smarts"
And in the SQL shell type "\. smarts.sql"
If you are not in the directory of the file smarts.sql then you need to give
a full path to this file.
Hope it helps.
Nicolas
-----Message d'origine-----
De : René Fournier [mailto:rene.fournier@markada.com]
Envoyé : mercredi 5 décembre 2001 17:02
À : mysql@lists.mysql.com; php-general@lists.php.net
Objet : [PHP] Dumped OK, Restore NOT
Little problem with MySQL 3.23.46 under Windows ME. I'm trying to create
a database from an .sql file (the dumped remains of a functioning
database--also MySQL). The dumping was easy, but I'm having a problem
putting it back. I have a dumped file called smarts.sql that starts this
way:
---------
# MySQL dump 8.14
#
# Host: localhost Database: smarts
#--------------------------------------------------------
# Server version 3.23.38
#
# Table structure for table 'about'
#
CREATE TABLE about (
id smallint(5) unsigned NOT NULL auto_increment,
lang char(2) default NULL,
recordname varchar(40) default NULL,
key1 tinytext,
key2 tinytext,
status varchar(10) default NULL,
title tinytext,
par1 tinytext,
PRIMARY KEY (id)
) TYPE=MyISAM;
#
# Dumping data for table 'about'
#
INSERT INTO about VALUES (1,'en','about'
-----------(and so on)
This is what I'm doing to try to recreate the database locally:
1. I type "mysqladmin create smarts"
OK--I see a new directory called "smarts" (no files in it)
2. I type "mysql smarts < smarts.sql"
It pauses for a few seconds (seeming to input the file), then returns
the DOS prompt with no message, error or otherwise. Seems to have
worked, right? But when I check the 'smarts' database directory, there
are no files in it. (Incidentally mysqld is running.)
What am I doing wrong??
...Rene
---
René Fournier
renefournier@yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net