RE: doing mulitple quires in one go.

2006-01-16 Thread Patrick Herber
Hi, Do you mean you have such a structure Table A ID_a ID_b ID_c ... Table B ID_b Value_b ... Table C ID_c Value_c ... ? In that case you can SELECT Value_b, Value_c FROM A LEFT JOIN B on A.ID_b=B.ID_b LEFT JOIN C on A.ID_c=C.ID_c WHERE ID_a=xxx Regards, Patrick -Original

UPDATE statement causes signal 11 on 5.0.16

2006-01-16 Thread Ian Sales (DBA)
Hi, I'm running a 5.0.16 instance on a Debian box (2.6.13 kernel). The following statement causes a signal 11 without fail, and each time when mysqld_safe restarts the daemon, no socket file is created: UPDATE X_Products.product_details AS pd , X_Products.tblMaxProductStockDisplay AS sd SET

Regarding the date values loading into the tables from a text file

2006-01-16 Thread lakshmi.narasimharao
Hi, I am trying to load the data from a text file into the table. I have two datetime datatype fileds in my table. When I loaded the data into the table using the Load Data INFILE syntax, In the table my date fileds values are loaded as -00-00 00:00:00. The datetime value in the

UPDATE Date Column

2006-01-16 Thread Shaun
Hi, I have a 2 Date Columns in my table, how can I update the 2nd date column so that the dates are 3 months previous to the orignial date column for every row. Thanks for your advice -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: UPDATE Date Column

2006-01-16 Thread Ady Wicaksono
Hi Shaun You could use DATE_ADD function with interval negative Shaun wrote: Hi, I have a 2 Date Columns in my table, how can I update the 2nd date column so that the dates are 3 months previous to the orignial date column for every row. Thanks for your advice -- MySQL

RE: UPDATE Date Column

2006-01-16 Thread Patrick Herber
Do you mean something like that? UPDATE tablename SET date2=DATE_ADD(date1, INTERVAL -3 MONTH) Regards, Patrick -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: Monday, 16 January 2006 15:27 To: mysql@lists.mysql.com Subject: UPDATE Date Column Hi, I have a 2

mysql driving make.

2006-01-16 Thread Hugh Sasse
I have a database backed-website in development. (It's Rails based, but for this question it probably doesn't matter.) To make sure things are clean during development I re-generate things from a script. Some things I generate depend on tables existing. Other things depend on tables being

Re: Regarding the date values loading into the tables from a text file

2006-01-16 Thread SGreen
[EMAIL PROTECTED] wrote on 01/16/2006 08:22:00 AM: Hi, I am trying to load the data from a text file into the table. I have two datetime datatype fileds in my table. When I loaded the data into the table using the Load Data INFILE syntax, In the table my date fileds values

Re: UPDATE Date Column

2006-01-16 Thread Shaun
Thanks Patrick, Will this work on 3.23? Patrick Herber [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you mean something like that? UPDATE tablename SET date2=DATE_ADD(date1, INTERVAL -3 MONTH) Regards, Patrick -Original Message- From: Shaun [mailto:[EMAIL

Nested scripts in MySQL?

2006-01-16 Thread Rhino
Is it possible to run nested scripts in MySQL? If I want to run a script called TestA1.sql where TestA1.sql contains: select * from Sample.emp; all I need to do is go to the MySQL command prompt and enter: \. TestA1.sql That's a single, un-nested script and it works fine. Now, suppose I

Re: UPDATE Date Column

2006-01-16 Thread Martijn Tonies
Will this work on 3.23? From what I can read here: http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html yes, it should. Nevertheless, it might be wise to FIRST tell the list your MySQL version and THEN ask for solutions to a problem... -- Martijn Tonies Database Workbench -

RE: Nested scripts in MySQL?

2006-01-16 Thread Dirk Bremer
-Original Message- From: Rhino [mailto:[EMAIL PROTECTED] Sent: Monday, January 16, 2006 09:10 To: mysql Subject: Nested scripts in MySQL? Is it possible to run nested scripts in MySQL? I tried this with success. Create a file that contains lines like this: \. today.sql \.

InnoDB table creation sequence

2006-01-16 Thread Rhino
Can anyone help me with an InnoDB problem? I am trying to create a sequence of related tables using InnoDB but I'm not having a lot of luck. The script I'm running would work fine in DB2 but the rules are obviously different in MySQL. I'm hoping someone can tell me how to modify my script so

Monitoring...

2006-01-16 Thread Sébastien Roy
Hey folks, Anyone know a Unix monitoring (text-based) software to check in realtime the usage of a MySQL server? Like nmon, topas, top or something like that but for MySQL except mytop? Thanks -- Sébastien Roy Administrateur de Systèmes Senior / Senior System Administrator PointPub

Re: Nested scripts in MySQL?

2006-01-16 Thread Rhino
Excellent, Dirk, that works perfectly! It's even logical; I might have stumbled on that syntax myself eventually :-) Rhino - Original Message - From: Dirk Bremer [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED]; mysql mysql@lists.mysql.com Sent: Monday, January 16, 2006 10:29 AM

Re: InnoDB table creation sequence

2006-01-16 Thread SGreen
Rhino [EMAIL PROTECTED] wrote on 01/16/2006 10:30:33 AM: Can anyone help me with an InnoDB problem? I am trying to create a sequence of related tables using InnoDB but I'm not having a lot of luck. The script I'm running would work fine in DB2 but the rules are obviously different in

Backups

2006-01-16 Thread Rick Dwyer
Hello all. I am looking into the different back up methods available for safeguarding my MySQL databases. Ideally, I would like to have dedicated machine on our network which all data is dumped to periodically. The tool I would like to use is MySQL Administrator although I could also use

Re: Nested scripts in MySQL?

2006-01-16 Thread Rhino
As it turns out, it is entirely possible to nest scripts to multiple levels. For instance I now have: Create_And_Load_Tables.sql --- \. Create_Tables.sql \. Load_Tables.sql --- Create_Tables.sql ---

Re: InnoDB table creation sequence

2006-01-16 Thread Rhino
- Original Message - From: [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql mysql@lists.mysql.com Sent: Monday, January 16, 2006 10:54 AM Subject: Re: InnoDB table creation sequence Rhino [EMAIL PROTECTED] wrote on 01/16/2006 10:30:33 AM: Can anyone help me with an InnoDB

RE: Backups

2006-01-16 Thread Ryan Stille
Furthermore, would it make more sense to have the data dump locally, and then use a script to move the contents of the dump to a machine on the network, perhaps even to a machine located on an alternate network accessed via a second ethernet card? This would be the simplest approach. That is

Re: Query Question

2006-01-16 Thread Michael Stassen
Douglas S. Davis wrote: Hi, If the following isn't appropriate, please feel free to ignore. The program I'm referring to is written in Perl and uses a MySQL database, so I thought perhaps it would be appropriate for this list. I have a webpage that displays a user's profile by selecting

Re: New install--access denied

2006-01-16 Thread Gleb Paharenko
Hello. You should check from where mysqladmin takes the 'webuser' value. There several places: http://dev.mysql.com/doc/refman/5.0/en/program-options.html Read this parts of the manual as well: http://dev.mysql.com/doc/refman/5.0/en/error-access-denied.html

Re: Help with SQL DELETE issue

2006-01-16 Thread Pete Harlan
Agreed. OTOH, I would recommend 4.1.15 until they solve the problem with updates in 4.1.16 apparently not using index prefixes. --Pete On Sun, Jan 15, 2006 at 05:07:08PM +, Jocelyn Fournier wrote: Hi, Excepted if he found a bug in an older version of MySQL, it's of course false ! (it

Re: Backups

2006-01-16 Thread Bill
Hi I'd say that you have an ideal situation to use a Raid level 1 system. Rick Dwyer [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello all. I am looking into the different back up methods available for safeguarding my MySQL databases. Ideally, I would like to have

doc for beginner admin

2006-01-16 Thread Bayrouni
Hello, I would like to understand the mysql administration, is there any good doc for beginners. Thank you -- Bayrouni Email: [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: doc for beginner admin

2006-01-16 Thread Danny Stolle
How about a start in the dev.mysql.com and browse for documentation. Start with the differences of all kinds of installations ;-) and using the [.]my.cnf file[s]. Cheers, Danny Bayrouni wrote: Hello, I would like to understand the mysql administration, is there any good doc for beginners.

retriving password

2006-01-16 Thread Xiaobo Chen
Hi, all I am trying to retrieve the password for one user in my database. When I say this: select password from user; The returned value is not human readable. Any one know how to converted it to readable format? Thanks in advance. Xiaobo -- Faculty of Computer Science Dalhousie University

Re: retriving password

2006-01-16 Thread Paul DuBois
At 15:14 -0400 1/16/06, Xiaobo Chen wrote: Hi, all I am trying to retrieve the password for one user in my database. When I say this: select password from user; The returned value is not human readable. Any one know how to converted it to readable format? The encryption is one-way, by

how to copt table not whole database

2006-01-16 Thread Xiaobo Chen
Hi, all How should I copy a table of a database? Thanks in advance. Xiaobo -- Faculty of Computer Science Dalhousie University Halifax, Nova Scotia Canada -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

dependency issues: coreutils and perl(DBI)

2006-01-16 Thread David Blake
I am attempting to install MySQL-server-5.0.18-0.glibc23 via rpm. I am getting this message: warning: MySQL-server-5.0.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: coreutils is needed by MySQL-server-5.0.18-0.glibc23 perl(DBI) is

average numbers, put in another table

2006-01-16 Thread douglass_davis
suppose I have two tables zips zipcode city_id (matches city_id in cities table) latitude longitude cities city_id latitude longitude Say I would like to average all the zipcode lat/lons in each city to get an average latitude and longitude for a city. Then, i would like to put

Stepping into libmySQL.dll with VC6

2006-01-16 Thread Jan M
Hi, How do I set things up so I can step into the libmySQL.dll from my C code using VC6? I am using the mysql 5.0 windows binary download. Thanks, Jan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: average numbers, put in another table

2006-01-16 Thread SGreen
[EMAIL PROTECTED] wrote on 01/16/2006 03:46:32 PM: suppose I have two tables zips zipcode city_id (matches city_id in cities table) latitude longitude cities city_id latitude longitude Say I would like to average all the zipcode lat/lons in each city to get an

Re: how to copt table not whole database

2006-01-16 Thread SGreen
Xiaobo Chen [EMAIL PROTECTED] wrote on 01/16/2006 03:33:36 PM: Hi, all How should I copy a table of a database? Thanks in advance. Xiaobo -- Faculty of Computer Science Dalhousie University Halifax, Nova Scotia Canada Do you want the data or the structure too? Just the data:

Re: dependency issues: coreutils and perl(DBI)

2006-01-16 Thread Daniel Kasak
David Blake wrote: I am attempting to install MySQL-server-5.0.18-0.glibc23 via rpm. I am getting this message: warning: MySQL-server-5.0.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: coreutils is needed by MySQL-server-5.0.18-0.glibc23

Re: Stepping into libmySQL.dll with VC6

2006-01-16 Thread Pooly
Hi, 2006/1/16, Jan M [EMAIL PROTECTED]: Hi, How do I set things up so I can step into the libmySQL.dll from my C code using VC6? Binary download for Win32 doesn't include a debug verison of the dll (AFAIK), so you'll have a recompile by yourself. Download the source, load the projet, chose

(mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams
Hi All, Having a bit of mysqldump trouble again. I've looked over the documentation (again) and can't seem to find the flag to make 'mysqldump' out put CREATE TABLE IF NOT EXISTS. Any ideas? Regards, Michael -- MySQL General Mailing List For list archives:

Re: (mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Jake Peavy
DROP TABLE IF NOT EXISTS? On 1/16/06, Michael Williams [EMAIL PROTECTED] wrote: Hi All, Having a bit of mysqldump trouble again. I've looked over the documentation (again) and can't seem to find the flag to make 'mysqldump' out put CREATE TABLE IF NOT EXISTS. Any ideas? Regards,

Re: Stepping into libmySQL.dll with VC6

2006-01-16 Thread Jan M
Hi, There is a debug dll with the binaries (at least there is a version in a /debug directory) but it seems to lack a symbol table - certainly VC6 states no debug information when loading. Dunno why it's provided. I hoped there was a shortcut where I could avoid building mysql myself (and

Re: ERROR 1114 (HY000): The table is full converting a big table from MyISAM to InnoDB on 5.0.18

2006-01-16 Thread Heikki Tuuri
Patrick, people have created files at least up to 500 GB using InnoDB's auto-extend feature. What does: ulimit -a say about the 'file size' of the user running mysqld? Have you put some disk space quotas on the directories of the MySQL datadir? Please correct me if I am wrong, but I think

Re: MySQL View Optimization Help

2006-01-16 Thread Daniel Kasak
[EMAIL PROTECTED] wrote: Views differ from tables in that they cannot be indexed. I've just started experimenting with derived tables under 4.1.14, and I had a hunch this was so. Is there any plan to include index support for views / derived tables? -- Daniel Kasak IT Developer NUS

Re: key_buffer_size vs innodb_buffer_pool_size

2006-01-16 Thread Grant Giddens
I don't know if I still fully understand. Say I have a database with a good mix of myisam and innodb type tables. If my server has 1 gig of ram and I set key_buffer_size=256M and innodb_buffer_pool_size=256M then wouldn't mysql be constrained to 512M of the ram and leave the remaining

Converting a date/time field to UTC

2006-01-16 Thread Ryan Stille
I have a timestamp stored in a datetime field. It gets set using Now() when the record was inserted. I would like to pull the data back out and have it in UTC time. Is there an easy way to do this? I've been through the manual and on google but haven't come up with anything. This is in a PHP

Most efficient way to design this table

2006-01-16 Thread Grant Giddens
Hi, I currently have a table with 2 columns, product_id and feature. Each product_id can have multiple features. My two columns are: product_id is type char(13) feature is type varchar(128) In order to make sure I don't have the same feature listed twice for a

question about master_pos_wait

2006-01-16 Thread wangxu
Slave server should automatically catch up master server when it be started. When i need use master_pos_wait?

error connecting to db.

2006-01-16 Thread doug
I have a php application that connects with MySQL using: $SvrConn = @mysql_connect($MySQLServer, $MySQLUser, $MySQLPassword) where: $MySQLServer='127.0.0.1' $MySQLUser='dbuser' MySQLPassword='dbpasswd' and I can login using the above values. However connect fails: mysql

Re: (mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams
I appreciate the suggestion, but I'm not looking to drop anything. I only want it as a safety net in the event that the table doesn't already exist. I'm doing syncing of sorts, and I want the CREATE TABLE IF NOT EXISTS so as not to throw errors in the event that the table already exists,

RE: error connecting to db.

2006-01-16 Thread Logan, David (SST - Adelaide)
Hi Doug, It is probably failing because you changed the ip address. The security system in MySQL is based around where a user is coming from. There is good documentation that is available here http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html I've referred to the current manual for

Re: Do mysql support command-level trigger?

2006-01-16 Thread wangxu
help - Original Message - From: wangxu [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, January 10, 2006 2:58 PM Subject:Do mysql support command-level trigger? Do mysql support command-level trigger?

Re: Do mysql support command-level trigger?

2006-01-16 Thread Paul DuBois
At 11:09 +0800 1/17/06, wangxu wrote: help It might be that you're getting no answer because we don't know what you're asking. - Original Message - From: wangxu [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, January 10, 2006 2:58 PM Subject:Do mysql support

Re: Do mysql support command-level trigger?

2006-01-16 Thread wangxu
sorry. In general,there are two kinds of trigger's activity. One is row activity. The other is SQL-statement activity. I want to know if mysql support the second. Do you understand? thanks - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: wangxu [EMAIL PROTECTED];

RE: error connecting to db.

2006-01-16 Thread doug
Thanks for the link I am glad the site has added manuals for multiple versions. I think I have access and db privileges set properly. I can (in effect) login to the server from the host command line using: mysql -u $MySQLUser -p $MySQLPassword I showed the user table on the off chance that

RE: error connecting to db.

2006-01-16 Thread Logan, David (SST - Adelaide)
Hi Doug, Can you connect using mysql -u $MySQLUser -p $MySQLPassword -h $MySQLServer? Without the -h option, the mysql client will connect via localhost and also via a unix socket rather than tcp/ip, by testing it as mentioned above, this will ensure it will actually connect to that host with

Re: Do mysql support command-level trigger?

2006-01-16 Thread Paul DuBois
At 11:54 +0800 1/17/06, wangxu wrote: sorry. In general,there are two kinds of trigger's activity. One is row activity. The other is SQL-statement activity. I want to know if mysql support the second. Do you understand? Okay, thanks, that helps. The answer is that MySQL supports

Re: error connecting to db.

2006-01-16 Thread Ligaya Turmelle
remove the @ - it surpresses the errors. set your error_reporting to E_ALL and find out the DB error message with mysql_error. error_reporting(E_ALL); $SvrConn = mysql_connect($MySQLServer, $MySQLUser, $MySQLPassword); if(!$SvrConn) { echo 'Failure to connect! Error message returned:

question about CONTAINS SQL

2006-01-16 Thread wangxu
I notice there are one section in the manual: CONTAINS SQL indicates that the routine does not contain statements that read or write data. And that the option is default. It's true? If i wouldn't do read or write in routine.What can i do yet?

Re: Most efficient way to design this table

2006-01-16 Thread C.R.Vegelin
Hi Grant, I suggest to change both key fields to Integers. Numeric keys take less space and are faster. Your Product_Feature table then may have: - product_id INT unsigned - feature INT unsigned having a Primary Key of 8 bytes i.s.o. 141 bytes. Thus a smaller index, less disk reads and more

Re: question about master_pos_wait

2006-01-16 Thread Jocelyn Fournier
Hi, It could be usefull when you need to wait the slave to be in sync with the master, after some specific queries for example. Regards, Jocelyn wangxu a écrit : Slave server should automatically catch up master server when it be started. When i need use master_pos_wait? -- MySQL

Re: Performance

2006-01-16 Thread Gleb Paharenko
Hello. You can use SHOW PROCESSLIST and slow log to find out what queries make such a heavy load. See: http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html Sebastien Roy wrote: Hey guys, In my last email I was talking

mysql-4.1.16 starting trouble

2006-01-16 Thread Trux
Hi! Sorry for my english, im russian. I have trouble with starting mysql-4.1.16. I compiled it from source, and when i run: # mysql_install_db --user=mysql i've got: - ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the