why different users get different count(*) from same table?

2009-06-29 Thread jinava
Hi experts, something strange here, use root and mysql (root and mysql are user accounts) to select count(*) from same table, but the result is different. login as root: mysql -uroot -p information_schema mysql> select * from tables where table_name='tb_staff'\G *** 1. r

RE: Update email address domain

2009-06-29 Thread John Furlong
Nathan, That was exactly what I was looking for, thanks for your help. John -Original Message- From: Nathan Sullivan [mailto:nsulli...@cappex.com] Sent: Monday, June 29, 2009 2:55 PM To: John Furlong; mysql@lists.mysql.com Subject: RE: Update email address domain John, I think this sh

RE: Update email address domain

2009-06-29 Thread Nathan Sullivan
John, I think this should work: UPDATE members SET email=REPLACE(email, SUBSTRING(email,INSTR(email,'@')+1), 'Thanks_in_advance.com.com') Regards, Nathan -Original Message- From: John Furlong [mailto:john.furl...@rakutenusa.com] Sent: Monday, June 29, 2009 12:54 PM To: mysql@lists.my

Update email address domain

2009-06-29 Thread John Furlong
I'm trying to mask the email addresses for a development database. I need to make all of the domains exactly the same. What is the best way to do this? We have about 67000 distinct domains. I was able to use substring to get the list of domains, but am not sure how to turn that into an update s

Try to create a tunnel SSH to remote DB server, but with error Number 2013

2009-06-29 Thread Lin Chun
hi As the DB server is behind bastion host, each time I have to connect to this host and then connect the DB server In order to connect the server from my pc windows, I use PuTTY to create a tunnel SSH, mapping 'remotserver:port' to 'localhost:6001' thought the bastion host After the configurati

Re: LOAD DATA INFILE Syntax error

2009-06-29 Thread Ralph Kutschera
Johnny Withers schrieb: Group is a keyword in mysql: You need to put backticks around it in your statement: | LOAD DATA INFILE 'test.csv' INTO TABLE table | FIELDS TERMINATED BY ',' | LINES STARTING BY '' TERMINATED BY '\n' | (Page, Device, `GROUP` , ItemID, Item, Value); Ooookay. Thank

Re: LOAD DATA INFILE Syntax error

2009-06-29 Thread Johnny Withers
Group is a keyword in mysql: You need to put backticks around it in your statement: | LOAD DATA INFILE 'test.csv' INTO TABLE table | FIELDS TERMINATED BY ',' | LINES STARTING BY '' TERMINATED BY '\n' | (Page, Device, `GROUP` , ItemID, Item, Value); On Mon, Jun 29, 2009 at 7:07 AM, Ralph K

LOAD DATA INFILE Syntax error

2009-06-29 Thread Ralph Kutschera
Hallo List! I have a CVS file which i would like to import to MySQL. The file header and an example: | Page,Device,Group,ItemID,Item,Value | Overview,General,Computer,513,OS,Linux The table has: | Create Table: CREATE TABLE `table` ( | `ID` int(11) NOT NULL auto_increment, | `Page` varch

RE: Growing database & Performance

2009-06-29 Thread Andrew Braithwaite
>> Would it be beneficial to divide this database tables >> across different databases where each database holds some tables? If you are planning to scale to large amounts of database activity in the future then yes, this will help very much. If you split your tables into several logical datab

ANN: MicroOLAP DAC for MySQL 2.7.2 released

2009-06-29 Thread Mikhail Oleynik
Greetings! Version 2.7.2 (June 16, 2009) This release introduces several new properties and design-time features. There are also several errors fixed. Don't forget to uninstall old version before installing the new one. If you install DAC for MySQL from sources you should build MySQLDAC*.dpk pa

Re: Problem with Dynamic table names.

2009-06-29 Thread Joerg Bruehe
Marco, all, Marco Bartz wrote: > I accidentally sent it before finishing... > > I am looking for a way to do the following with a single query: >> SELECT `ID`, `Name`, `Interface`, >> (SELECT count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as >> `activeListings` >> FROM `sites`

Re: Problem with Dynamic table names.

2009-06-29 Thread nigel wood
Marco Bartz wrote: I accidentally sent it before finishing... I am looking for a way to do the following with a single query: SELECT `ID`, `Name`, `Interface`, (SELECT count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as `activeListings` FROM `sites` I am querying the

Re: Problem with Dynamic table names.

2009-06-29 Thread Marco Bartz
I accidentally sent it before finishing... I am looking for a way to do the following with a single query: > SELECT `ID`, `Name`, `Interface`, > (SELECT count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as > `activeListings` > FROM `sites` > I am querying the sites table and I want

Problem with Dynamic table names.

2009-06-29 Thread Marco Bartz
I am looking for a way to do the following with a single query: SELECT `ID`, `Name`, `Interface`, (select count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as `activeListings` FROM `sites`