Re: Multiple instances howto
In addition, can you run multiple instances of mysqld simultaneous? toutiao wrote: > > > Dear Friends, > > I'm learning to create multiple mysqld instances on Linux, where one > instance of mysql is already running. > > While creating a new my.cnf file, I noticed that I need to assign a socket > file to it. > > Can you pls. tell me how to create / test this socket file? > > Thanks, > Jing Zhang > > -- View this message in context: http://www.nabble.com/Multiple-instances-howto-tp16338723p16344323.html Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Multiple instances howto
Dear Friends, I'm learning to create multiple mysqld instances on Linux, where one instance of mysql is already running. While creating a new my.cnf file, I noticed that I need to assign a socket file to it. Can you pls. tell me how to create / test this socket file? Thanks, Jing Zhang -- View this message in context: http://www.nabble.com/Multiple-instances-howto-tp16338723p16338723.html Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Completeness rate of records
Olaf Stein <[EMAIL PROTECTED]> wrote on 03/27/2008 01:16:43 PM: > Hey all, > > I have a table with 40 columns. If for a record a value is not available the > column is set to NULL. Is there a quick way of finding out how many records > have a value (NOT NULL) for 90% (or lets say 35 columns) of the columns. > > Thanks > Olaf > Try something like: Select sum(case when column1 is not null then 1 else 0 end) as column1NotNullCount, sum(case when column2 is not null then 1 else 0 end) as column2NotNullCount, ... from table You can use the concat function to create the individual column statements so you don't have to type 35 selects items: select concat('sum(case when ', column_name, ' is not null then 1 else 0 end) as ', column_name, 'NotNullCount,') from information_schema.columns where table_schema='YourDBNameHere' and table_name= 'YourTableNameHere' Donna
Re: Completeness rate of records
Thanks. But that means I have to type all 40 column names, which I what IU was trying to avoid Olaf On 3/27/08 1:34 PM, "Rob Wultsch" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 10:16 AM, Olaf Stein > <[EMAIL PROTECTED]> wrote: >> I have a table with 40 columns. If for a record a value is not available the >> column is set to NULL. Is there a quick way of finding out how many records >> have a value (NOT NULL) for 90% (or lets say 35 columns) of the columns. > > Quick and dirty I would write a query that would compute a score for each row > based on the number of rows: > if(col1 IS NULL,0,1)+if(col2 IS NULL,0,1) > > and based on that perform a test to see if the row is NULL'enough (or > whatever): > if(if(col1 IS NULL,0,1)+if(col2 IS NULL,0,1) +if(col2 IS NULL,0,1) +if(col2 IS > NULL,0,1)>3, 1,0) > so that will return 1 if 3 out of 4 are NULL, and 0 otherwise. > > and you could throw all of that inside of a sum() and get the number of rows > that fit your pattern. - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you.
Re: Completeness rate of records
On Thu, Mar 27, 2008 at 10:16 AM, Olaf Stein < [EMAIL PROTECTED]> wrote: > I have a table with 40 columns. If for a record a value is not available > the > column is set to NULL. Is there a quick way of finding out how many > records > have a value (NOT NULL) for 90% (or lets say 35 columns) of the columns. > Quick and dirty I would write a query that would compute a score for each row based on the number of rows: if(col1 IS NULL,0,1)+if(col2 IS NULL,0,1) and based on that perform a test to see if the row is NULL'enough (or whatever): if(if(col1 IS NULL,0,1)+if(col2 IS NULL,0,1) +if(col2 IS NULL,0,1) +if(col2 IS NULL,0,1)>3, 1,0) so that will return 1 if 3 out of 4 are NULL, and 0 otherwise. and you could throw all of that inside of a sum() and get the number of rows that fit your pattern. -- Rob Wultsch
Completeness rate of records
Hey all, I have a table with 40 columns. If for a record a value is not available the column is set to NULL. Is there a quick way of finding out how many records have a value (NOT NULL) for 90% (or lets say 35 columns) of the columns. Thanks Olaf - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Group by function and avg on char
Hi all, got a simple problem I'm trying to solve without success. Given the following table CREATE TABLE `scores` ( `proj` char(3) NOT NULL default '', `id` int(11) NOT NULL default '0', `score` double default NULL, `cpid` char(32) default NULL, `team` char(20) default NULL, PRIMARY KEY (`proj`,`id`), KEY `cpid` (`cpid`,`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | insert into scores values ('a',1,100,'aaa','X'); insert into scores values ('b',2,50,'aaa','X'); insert into scores values ('c',2,500,'aaa','Y'); I have the following sql to get the sum of scores for the cpid (cross project id) select cpid,sum(score) from scores group by cpid; This is simple enough and works fine. However I also wish to select the team given this case, I'd like to get 'X' as there are two instances of 'X' and only one of 'Y' Is this possible in the same sql statement, something like an AVG for a string, or a median perhaps. Regards Phil -- Help build our city at http://free-dc.myminicity.com !
rsync errors
Hi I am running the command on Gentoo OS /usr/bin/rsync -avO /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ > /tmp/rsync-${TIMESTAMP}.log 2>&1 I am getting the below error in the log file mysql/ rsync: failed to set permissions on "/var/lib/mysql": Operation not permitted (1) rsync: failed to open "/var/lib/mysql/ib_logfile0", continuing: Permission denied (13) mysql/ib_logfile0 rsync: failed to open "/var/lib/mysql/ib_logfile1", continuing: Permission denied (13) mysql/ib_logfile1 rsync: failed to open "/var/lib/mysql/ibdata1", continuing: Permission denied (13) mysql/ibdata1 rsync: failed to open "/var/lib/mysql/master.info", continuing: Permission denied (13) mysql/master.info rsync: failed to open "/var/lib/mysql/SCHEDULER /ScheduleTasks.MYD", continuing: Permission denied (13) Any thing I am missing I did setfacl -R -dm u:sms:rwx /var/lib/mysql on hostaa setfacl -R -dm u:mysql:rwx /var/lib/mysql on hostaa chmod -R g-x,g+X /var/lib/mysql on hostaa but no luck Thanks and Regards Kaushal
Re: [PHP] How to install PHP 5.x on Windows Server 2000 with IIS 5 and MySQL 5.x
[EMAIL PROTECTED] wrote: > Hello to All, > > Would you mind to help as the title of mail ? > > Thanks ! > > Edward. > What problems are you having? Have you read the Manual yet? I'd suggest going with a real operating system (linux) which keeps patches updated quicker... Wolf -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Cisco Access Registrar & MySQL Cluster
Cisco's Access Registrar supports MySQL 4.x. Does anyone have any experience trying to make it work with MySQL Cluster? Ben Wiechman Network Admin Wisper High Speed Internet [EMAIL PROTECTED]
R: version mimatch
First, I don't know if there is a way to make binlogs compatible, it seems SQL syntax incompatibility. You should look for single errors and correct it by hand or, if your target is to import data from a MySQL 4.x server to a MySQL 3.x server you could import the binlogs into a MySQL 4.x server, dump the databases and reimport them in the MySQL 3.x server. Finally my hint is to upgrade the DB server to 5.x version, It's much much better and it is not hard to do the migration. Aloha! Claudio Nanni -Messaggio originale- Da: Naufal Sheikh [mailto:[EMAIL PROTECTED] Inviato: lunedì 24 marzo 2008 17.53 A: mysql@lists.mysql.com Oggetto: version mimatch Hi, I had binlogs from the mysql 4 which I was trying to get into mysql3 using the mysqlbinlog utility. Obviously I got the version mismatch error i.e ERROR 1064 at line 8: You have an error in your SQL syntax near 'DEFAULT ROW_FORMAT=DEFAULT' at line 1 My question, is there anywaay to make the logs compatible? Any help/pointer to where to look will be appreicated Thanks --NZ "Questo messaggio ed ogni suo allegato sono confidenziali e possono essere riservati o, comunque, protetti dall'essere diffusi. Se il ricevente non é il destinatario diretto del presente messaggio, é pregato di contattare l'originario mittente e di cancellare questo messaggio ed ogni suo allegato dal sistema di posta. Se il ricevente non é il destinatario diretto del presente messaggio, sono vietati l'uso, la riproduzione e la stampa di questo messaggio e di ogni suo allegato, nonché la diffusione del loro contenuto a qualsiasi altro soggetto" * "This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please contact the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not use, copy or print this message or attachment or disclose the contents to any other person." -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
R: SqlState error code 42S22 driving me insane
Hi Mike, could you please be more precise? What platform, language, versions are you using for the client application? What o.s. and version are you using for mysql server? Which is the code giving you problems? The more information you give, the easier is to answer. Aloha! Claudio Nanni -Messaggio originale- Da: Michael Abbott [mailto:[EMAIL PROTECTED] Inviato: lunedì 24 marzo 2008 2.36 A: mysql@lists.mysql.com Oggetto: SqlState error code 42S22 driving me insane Hi folks SqlState 42s22 is killing me slowly here I have 2 programs reading exactly the same table in the same database. 1 program declares, opens, fetchs, updates cursor No problem. The second program uses exactly the same code, but the declare cursor blows out on a 42s22 code. I for the life of me cannot figure out what is happening... I copied and paste the code from the working program into the non working program to no avail, same error condition repeats. Has anyone ever seen this before, or does anyone have any suggestions. Thank-you Mike _ Sympatico/MSN Autos wants to put YOU in a 2008 Eclipse! Click here to enter! http://g.msn.ca/ca55/212 "Questo messaggio ed ogni suo allegato sono confidenziali e possono essere riservati o, comunque, protetti dall'essere diffusi. Se il ricevente non é il destinatario diretto del presente messaggio, é pregato di contattare l'originario mittente e di cancellare questo messaggio ed ogni suo allegato dal sistema di posta. Se il ricevente non é il destinatario diretto del presente messaggio, sono vietati l'uso, la riproduzione e la stampa di questo messaggio e di ogni suo allegato, nonché la diffusione del loro contenuto a qualsiasi altro soggetto" * "This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please contact the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not use, copy or print this message or attachment or disclose the contents to any other person." -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]