[PHP] Where does mysql keep the records data

2001-10-29 Thread PHP Mail

On my system the mysql and test databases are created in /var/db/mysql/

I created a database called publish and it likewise was stored in 
/var/db/mysql/publish.

I needed to start over with the work on publish so I deleted the publish 
directory. #rm -R /var/db/mysql/publish.

BUT after re-creating the tables all the records still existed, so the 
records weren't in /var/db/mysql/publish. Where is it?

# rm -R /var/db/mysql/publish
# mysqladmin create publish
# mysql
mysql use publish
mysql CREATE TABLE eZAddress_AddressType (
   ID int(11) NOT NULL,
   Name varchar(50),
   ListOrder int(11) DEFAULT '0' NOT NULL,
   Removed int(1) DEFAULT '0' NOT NULL,
   PRIMARY KEY (ID)
);

mysql INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0);
ERROR 1062: Duplicate entry '1' for key 1

Where dat data at?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Where does mysql keep the records data

2001-10-29 Thread Kurt Lieber

On Monday 29 October 2001 07:51 am, you wrote:
 I needed to start over with the work on publish so I deleted the publish
 directory. #rm -R /var/db/mysql/publish.

Um, not that it's PHP-related, but...

You should use drop database instead of manually removing the file.

mysql drop database databasename

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Where does mysql keep the records data

2001-10-29 Thread Henrik Hudson

To delete a database, the best thing to do is login to your mysql DB 
directly, ie:  mysql -u root -p (the root user is the MySQL root, not the 
sytem root) and supply the password at the prompt. Then do:

DROP DATABASE publish;

This will delete it correctly.  Something that I do is put all my table 
creations into a file and at the top I put DROP DATABASE name and then 
recreate it and all my tables. This will reset your database nicely and you 
can pipe this script into your mysql above, ie:

mysql -u root -p  scriptname

Hope that helps.

Henrik

On Monday 29 October 2001 09:51, PHP Mail wrote:
  On my system the mysql and test databases are created in /var/db/mysql/

  I created a database called publish and it likewise was stored in
  /var/db/mysql/publish.

  I needed to start over with the work on publish so I deleted the publish
  directory. #rm -R /var/db/mysql/publish.

  BUT after re-creating the tables all the records still existed, so the
  records weren't in /var/db/mysql/publish. Where is it?

  # rm -R /var/db/mysql/publish
  # mysqladmin create publish
  # mysql
  mysql use publish
  mysql CREATE TABLE eZAddress_AddressType (
 ID int(11) NOT NULL,
 Name varchar(50),
 ListOrder int(11) DEFAULT '0' NOT NULL,
 Removed int(1) DEFAULT '0' NOT NULL,
 PRIMARY KEY (ID)
  );

  mysql INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0);
  ERROR 1062: Duplicate entry '1' for key 1

  Where dat data at?

-- 

Henrik Hudson
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]