Re: Local 'replication'

2006-02-12 Thread Dan Trainor
Rob Gormley wrote: Short of running two MySQL instances on the same server... What I would like to do is have a table which exists on disk in InnoDB format, and a Memory table which clients make requests for. Lest that sound more convuluted than it really is, the situation is thus: Limited (fin

Re: copy db to external host

2006-02-12 Thread Angelo Christou
--- Peter Brawley <[EMAIL PROTECTED]> wrote: > Angelo, > > >Upload the data > > If phpMyAdmin is your only access to your webhost > db, you can paste the > contents of your local dump.sql into phpMyAdmin's > SQL window, and run it > (all at once, or piece by piece). > > PB Hello Peter. Tha

Re: copy db to external host

2006-02-12 Thread Peter Brawley
Angelo, >Upload the data If phpMyAdmin is your only access to your webhost db, you can paste the contents of your local dump.sql into phpMyAdmin's SQL window, and run it (all at once, or piece by piece). PB - Angelo Christou wrote: Is there any scripts that people know of

Local 'replication'

2006-02-12 Thread Rob Gormley
Short of running two MySQL instances on the same server... What I would like to do is have a table which exists on disk in InnoDB format, and a Memory table which clients make requests for. Lest that sound more convuluted than it really is, the situation is thus: Limited (financial) resources cli

Re: copy db to external host

2006-02-12 Thread Angelo Christou
> >Is there any scripts that people know of that can > be > >called from cron that I can use to copy the latest > >database to the latest version? > > If you have shell access, you can run mysqldump to > write the DDL and > data to a sql file. See the mysqldump manual page > for its many options.

Re: arbitrary ORDER BY

2006-02-12 Thread Steve Lefevre
Peter Brawley wrote: Steve, Look for 'FIELD(' at http://dev.mysql.com/doc/refman/5.0/en/string-functions.html. PB Thanks, Pete! For posterity, this is how I solved the problem: To create an abitrary for the ORDER BY clause, create a field like this: SELECT FIELD( field, "arbitrary sor

Re: Timestamp error

2006-02-12 Thread Michael Stassen
pedro mpa wrote: Greetings! I am building a website using MySQL 5.0.18 and PHP 5.1.2. When I try to insert in a table a timestamp value from php's mktime() I get the following error: 1292: Incorrect datetime value: '1139776424' for column 'access_date' at row 1 The sql for the table is: CREATE

Re: How to select data if not in both tables?

2006-02-12 Thread Peter Brawley
Bob, There's some discussion of it at http://dev.mysql.com/doc/refman/5.0/en/rewriting-subqueries.html. PB - Bob Gailer wrote: Michael Stassen wrote: Bob Gailer wrote: Peter Brawley wrote: Grant, >If I want to select all the products that are in the product_table, >but not in the s

Re: How to select data if not in both tables?

2006-02-12 Thread Bob Gailer
Michael Stassen wrote: Bob Gailer wrote: Peter Brawley wrote: Grant, >If I want to select all the products that are in the product_table, >but not in the sale_table, how to make the query? The product_table >has all the products, but the sale table is a subset of the product_table. SELE

Random ID's for existing data

2006-02-12 Thread Brian Menke
I have a table with about 2000 entries with names and other data. Ultimately I'm going to make a database backed web site with this and I want to provide existing users with random id's that they will use for their passwords. I was wondering how to take the existing data and add random id's to it.

Re: cannot delete row but permissions ok

2006-02-12 Thread Peter
--- Dan Trainor <[EMAIL PROTECTED]> wrote: > Peter wrote: > > While on MySQL 4.0.24, I connect to my database: > > > > $ mysql -u amavisd -ppassword spamassassin > > > > This user can select and insert (that is confirmed) but cannot delete > a > > row: > > > > mysql> delete from users where 'f

Re: copy db to external host

2006-02-12 Thread Peter Brawley
Angelo Is there any scripts that people know of that can be called from cron that I can use to copy the latest database to the latest version? If you have shell access, you can run mysqldump to write the DDL and data to a sql file. See the mysqldump manual page for its many options. AFAIK M

Weird MySQL Connection Issues

2006-02-12 Thread Aaron Axelsen
I have been experiencing some weird MySQL connection issues lately. Twice now in that last couple weeks, there have been times where some mysql applications are working, and others are not working. Both times the mysql connection limit was rather high. A simple mysql restart has fixed the proble

copy db to external host

2006-02-12 Thread Angelo Christou
Hello List. I have an internal MySQL db that I would like to copy (replicate?) to an external webhost. I do not have shell access to the remote host which is why I cannot perform proper replication. How should I go about doing this? Is there any scripts that people know of that can be called fr

Re: cannot delete row but permissions ok

2006-02-12 Thread Dan Trainor
Peter wrote: --- Dan Trainor <[EMAIL PROTECTED]> wrote: Peter wrote: While on MySQL 4.0.24, I connect to my database: $ mysql -u amavisd -ppassword spamassassin This user can select and insert (that is confirmed) but cannot delete a row: mysql> delete from users where 'fullname' = 'bo

Re: cannot delete row but permissions ok

2006-02-12 Thread Dan Trainor
Peter wrote: While on MySQL 4.0.24, I connect to my database: $ mysql -u amavisd -ppassword spamassassin This user can select and insert (that is confirmed) but cannot delete a row: mysql> delete from users where 'fullname' = 'bongo.net' limit 1; ERROR 1044: Access denied for user: '[EMAIL PRO

Fw: Multiple many-to-many SELECT

2006-02-12 Thread Rhino
Oops, I meant to send this to the list so that all could benefit. -- Rhino - Original Message - From: "Rhino" <[EMAIL PROTECTED]> To: "Jessica Yazbek" <[EMAIL PROTECTED]> Sent: Sunday, February 12, 2006 4:19 PM Subject: Re: Multiple many-to-many SELECT Assuming you are only worried a

Timestamp error

2006-02-12 Thread pedro mpa
Greetings! I am building a website using MySQL 5.0.18 and PHP 5.1.2. When I try to insert in a table a timestamp value from php's mktime() I get the following error: 1292: Incorrect datetime value: '1139776424' for column 'access_date' at row 1 The sql for the table is: CREATE TABLE `members_acs`

Re: Multiple many-to-many SELECT

2006-02-12 Thread Peter Brawley
Jessica, Your first query, with inner joins, fails with the error message Unknown column 'movies.id' in 'on clause because the query inside parentheses in ... ... FROM movies INNER JOIN (director INNER JOIN director_movies ON director_movies.director_id = director.id AND director_mov

Re: Multiple many-to-many SELECT

2006-02-12 Thread Jessica Yazbek
By request, here are the create statements for my tables: movies | CREATE TABLE `movies` ( `id` int(11) NOT NULL default '0', `catalog_description` text, `title` text, `website_url` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 director | CREATE TABLE `director` ( `i

Re: Problem starting

2006-02-12 Thread DonM
On Saturday 11 February 2006 21:53, CasperLinux wrote: > I had a working database then had a power glitch shutdown the computer. > Afterwards I began receiving all sorts of errors. I cleaned through most > of them but this one is stumping me. I tried to uninstall and reinstall > mysql-server to n

Re: How to select data if not in both tables?

2006-02-12 Thread Grant Giddens
Thanks, This worked exactly like I had hoped. Grant Peter Brawley <[EMAIL PROTECTED]> wrote:Grant, >If I want to select all the products that are in the product_table, >but not in the sale_table, how to make the query? The product_table >has all the products, but the sale table is

Re: arbitrary ORDER BY

2006-02-12 Thread Peter Brawley
Steve, >I have a project where I need to sort rows by an arbitrary order. >I seem to recall at some point where I was able to do some SQL like: >ORDER BY >type = "the first type", >type = "another type", >type = "yes another arbitrary type" ... Check out the FIELD() function. PB -

Re: Passing db names to a stored proc in MySQL 5

2006-02-12 Thread Peter Brawley
Rory, Martin >>CREATE STORED PROCEDURE testStoredProc (IN test_db_name CHAR) >>BEGIN >>SELECT * FROM test_db_name.test_table; >>END; MySQL does not resolve test_db_name to the value passed in the parameter, and the query fails because there is no database with that name. Is there any way a

cannot delete row but permissions ok

2006-02-12 Thread Peter
While on MySQL 4.0.24, I connect to my database: $ mysql -u amavisd -ppassword spamassassin This user can select and insert (that is confirmed) but cannot delete a row: mysql> delete from users where 'fullname' = 'bongo.net' limit 1; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to dat

Unable to duplicate a database at home, possible encoding problem

2006-02-12 Thread Dave M G
MySQL list, I'm afraid this explanation is a bit long, but hopefully it's clear and concise. A while back I reported having troubles copying a database from my hosting service to my home machine. One of the problems I encountered was that I had some table columns named "group", wh

Re: Returning values from an INSERT

2006-02-12 Thread Jonathan Mangin
- Original Message - From: "bob pilly" <[EMAIL PROTECTED]> To: Sent: Sunday, February 12, 2006 12:44 AM Subject: Returning values from an INSERT > Hi everyone, im new to SQL and have a question that someone can hopefully answer > > If i am inserting a new record into a table that has