Insert blob data using prepared statements

2010-07-26 Thread Manasi Save
Hi All, I need to insert Blob data in my table using prepared statements. But Whenever I try to insert it using prepared statement it is giving me mysql syntax error. Here's the prepared statement :- SET @stmt = Concat(Insert into ',mydb,'.MyTable(MyData, MyID) Select

Re: migration via replication for large DB?

2010-07-26 Thread Anirudh Sundar
Hello Goeff, Data Import might take some time (considering 50 GB) if the majority of the tables are of type INNODB. If yes, 4 hours should not be enough. If its MYISAM, you can go ahead (Provided you choose data import to replication). Another suggestion would be :- Take a FULL tar of the MYSQL

Re: migration via replication for large DB?

2010-07-26 Thread Prabhat Kumar
Another suggestion would be :- Take a FULL tar of the MYSQL Data Directory and push it to the NEW server and untar and start mysql (take the master status of the probable Master Server, for replication and bringing the new server to sync with its Master). I think this should be one of the

RE: Why is MySQL always linked to PHP?

2010-07-26 Thread Martin Gainty
MySQL is written in C if your requirement is to write extension packages for MySQL then use the OS specific C compiler to write the functions deferring to MySQL staff to handle your other questions Martin Gainty __ Verzicht und

Re: Need Help Writing Simple Query

2010-07-26 Thread Mark Phillips
On Sun, Jul 25, 2010 at 8:49 PM, Nguyen Manh Cuong cuong.m...@vienthongso.com wrote: Hi Mark, Please test this query: select test1.*, (select name from test2 where test2.id=test1.`v_id` limit 1) as name_1, (select name from test2 where test2.id=test1.`h_id` limit 1) as name_2 from test1;

How to use SSL? (SSL is enabled but not used)

2010-07-26 Thread Yves Goergen
Hello, I have setup a MySQL 5.1 server on Ubuntu Linux 10.4 and created an SSL certificate and key. I updated the MySQL configuration to point to the SSL files. There's no error message at startup in MySQL's error log. (Before I granted the process access to the SSL files through AppArmor, there

Re: Table which can reference a number of other tables

2010-07-26 Thread Marc Guay
I keep running into problems like this and have another example of it that might be clearer. I have 4 tables, Newsletters, Contacts, Industries, and Contact Groups. We send Newsletters to Contacts, either grouped by Industry or Contact Group. Contact Groups must be associated with an Industry.

Re: Allowing Connections From Remote Clients

2010-07-26 Thread Carlos Mennens
Guys - I am no expert but I don't think this is a DNS or rDNS issue. All resolution appears to be working fine. When my PC (tuna) attempts to connect to the MySQL server via MySQL Workbench, it says Failed to Connect to MySQL at mysql.iamghost.com:3306 with user root Host 'tuna.iamghost.com' is

Re: Table which can reference a number of other tables

2010-07-26 Thread Geert-Jan Brits
Am I correct in assuming that Industries can be seen as some sort of super contact-group in your application? If so, you could merge Contact group and Industries -- Contact group Contact Groups -- id name parent_id (FK) type (industry_level, sub_level, some_other_level) this

Yet another query question

2010-07-26 Thread Michael Stroh
Hi everyone and thanks in advance for the help. I have a query that I'd like to perform using two tables but am not sure what the best way to perform it short of creating a loop in my code and performing multiple queries. I have two tables. The first table acts as a master table of sorts and

RE: Yet another query question

2010-07-26 Thread Gavin Towey
You'll need to use the technique described here: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html -Original Message- From: Michael Stroh [mailto:st...@astroh.org] Sent: Monday, July 26, 2010 2:50 PM To: MySql Subject: Yet another query question Hi everyone

Re: Yet another query question

2010-07-26 Thread Geert-Jan Brits
Aren't you grouping on IDt? something like ? : select t2.IDt,t2.ID,t2.Num,max(t2.version) from table1 as t1, tabl2 as t2 where t1.num=t2.num and t1.state!='new' group by t2.IDt Cheers, Geert-Jan 2010/7/26 Michael Stroh st...@astroh.org Hi everyone and thanks in advance for the help. I have a

Re: Yet another query question

2010-07-26 Thread Michael Stroh
Yes, sorry, you are correct. I am actually grouping on that other column. I'll take a look at this and see if it works for me. Thanks! Michael On Jul 26, 2010, at 6:10 PM, Geert-Jan Brits wrote: Aren't you grouping on IDt? something like ? : select t2.IDt,t2.ID,t2.Num,max(t2.version)

idle query

2010-07-26 Thread Mike Spreitzer
A colleague is running MySQL community server 5.1.34 on RHEL 5 on a big Xeon-based SMP (16 CPUs, 64 GB memory). It is taking a surprisingly long time to execute a query, yet is not working particularly hard at it. I wonder why this might be. Following are details. First, some `vmstat`

Re: idle query

2010-07-26 Thread Dan Nelson
In the last episode (Jul 26), Mike Spreitzer said: A colleague is running MySQL community server 5.1.34 on RHEL 5 on a big Xeon-based SMP (16 CPUs, 64 GB memory). It is taking a surprisingly long time to execute a query, yet is not working particularly hard at it. I wonder why this might be.

Re: idle query

2010-07-26 Thread Mike Spreitzer
Thanks for the clues. In this case the storage is not on a SATA disk, rather is it on a GPFS ( http://en.wikipedia.org/wiki/IBM_General_Parallel_File_System) mount. This thing is capable of quite a lot more I/O bandwidth. I invoked `wc` on a large file and it took the bi stat of `vmstat` over

Re: idle query

2010-07-26 Thread Dan Nelson
In the last episode (Jul 27), Mike Spreitzer said: Thanks for the clues. In this case the storage is not on a SATA disk, rather is it on a GPFS ( http://en.wikipedia.org/wiki/IBM_General_Parallel_File_System) mount. This thing is capable of quite a lot more I/O bandwidth. I invoked `wc` on

Re: Allowing Connections From Remote Clients

2010-07-26 Thread jayabharath
Hi Carlos, From your trailing mail I noticed the below GRANT. This will just give 'cmennens'@'ideweb1.iamorlando.com' access to mysql but not any databases. *Access to mysql:* | GRANT USAGE ON *.* TO 'cmennens'@'ideweb1.iamorlando.com' IDENTIFIED BY PASSWORD '' | In addition

Re: idle query

2010-07-26 Thread Mike Spreitzer
Sure, `wc` is different from mysql --- but different enough to account for a 16000:75 ratio? Will iostat give a good utilization metric for GPFS? If I want to try to actually hold a 2GB table in RAM, is there anything I need to set in my.cnf to enable that? Thanks, Mike Spreitzer SMTP: