mysql claims table does not exist. but it does

2007-10-31 Thread robert rottermann
Hi there,
I have a strange problem.

I am using Server version: 5.0.45 SUSE MySQL RPM

I made a backup of a database by copying its directory like so:
mv urulu urulu_X
then I recreateded the database, played a little with it and then
dropped it again.
the I moved the old database in place again.
now when I want to access the tables of the database I get an error that
the tables do not exist, alltough the showtables lists them correctly.

what can I do to fix that?
to explayin thin a bit better, here a dump of an mysql dialog

mysql use urulu
Database changed
mysql show tables;
+--+
| Tables_in_urulu  |
+--+
| dataccess|
| datancestors |
| datchildren  |
| datserialisation |
| datstat  |
| datvariables |
| datwidgets   |
| defchildren  |
| defdependencies  |
| defgeneral   |
| defhandler   |
| defvariables |
| lang |
| session  |
| synaccess|
| synconnect   |
| syncreate|
| syndata  |
| synproperties|
| syntoc   |
| xslcache |
+--+
21 rows in set (0.00 sec)

mysql select * from lang;
ERROR 1146 (42S02): Table 'urulu.lang' doesn't exist
mysql

thanks
robert


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Inserting a value in an autoincrement list?

2007-10-31 Thread Sebastian Mendel
Richard schrieb:
 I want to have a list of titles to which I can add new ones either at
 the end of the list or in a chosen position so I can choose what order
 they show up in.
 
 The first solution that I thought of was to add one to all of the
 position values heigher than the position I wish to insert the new one
 to. But this would envolve alot of queries and therefore resources.
 
 So now I'm wandering if it is possible to do this directly with mysql.
 Here is an example of what I want to do
 I will have a table called titles like this :
 
 
 table : title
 ---
POSTITION|   TITLE
1|   title joejjeo
2|   title ejuejej
3|   title ekkke
4|   title eueoueo
5|title eehiehiehop
 
 
 And I wish to insert :
 
3|title inserted
 
 So that titles in positions 3, 4 and 5 become titles 4, 5 and 6


just two queries:

UPDATE `title`
SET `POSTITION` = `POSTITION` + 1
WHERE `POSTITION`  2;

INSERT ...;

-- 
Sebastian

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Problem with upgrade command in mysql.

2007-10-31 Thread Ravi Shanmugam
Hi,
 
I have a script which updates a mysql table. When I run this script the
update in not happening.
But if I stop mysql and start in safe mode as follows
 
mysqld_safe --skip-grant-tables --user=root 
 
then the update script is running properly.
 
Why it is not happening in the non safe mode.
 
Could somebody help me. Your help will be appreciated.
 
Regds,
RSR
SASKEN BUSINESS DISCLAIMER
-
This message may contain confidential, proprietary or legally privileged 
information. In 
case you are not the original intended Recipient of the message, you must not, 
directly or 
indirectly, use, Disclose, distribute, print, or copy any part of this message 
and you are 
requested to delete it and inform the sender. Any views expressed in this 
message are 
those of the individual sender unless otherwise stated. Nothing contained in 
this message 
shall be construed as an offer or acceptance of any offer by Sasken 
Communication 
Technologies Limited (Sasken) unless sent with that express intent and with 
due 
authority of Sasken. Sasken has taken enough precautions to prevent the spread 
of 
viruses. However the company accepts no liability for any damage caused by any 
virus 
transmitted by this email


disconection

2007-10-31 Thread Mulyadi

- Original Message -
From: Ravi Shanmugam [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, October 31, 2007 3:32 PM
Subject: Problem with upgrade command in mysql.


Hi,

I have a script which updates a mysql table. When I run this script the
update in not happening.
But if I stop mysql and start in safe mode as follows

mysqld_safe --skip-grant-tables --user=root 

then the update script is running properly.

Why it is not happening in the non safe mode.

Could somebody help me. Your help will be appreciated.

Regds,
RSR
SASKEN BUSINESS DISCLAIMER
-
This message may contain confidential, proprietary or legally privileged
information. In
case you are not the original intended Recipient of the message, you must
not, directly or
indirectly, use, Disclose, distribute, print, or copy any part of this
message and you are
requested to delete it and inform the sender. Any views expressed in this
message are
those of the individual sender unless otherwise stated. Nothing contained in
this message
shall be construed as an offer or acceptance of any offer by Sasken
Communication
Technologies Limited (Sasken) unless sent with that express intent and
with due
authority of Sasken. Sasken has taken enough precautions to prevent the
spread of
viruses. However the company accepts no liability for any damage caused by
any virus
transmitted by this email



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Fw: Inserting a value in an autoincrement list?

2007-10-31 Thread Mulyadi
mysql@lists.mysql.com
- Original Message -
From: Sebastian Mendel [EMAIL PROTECTED]
To: Richard [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, October 31, 2007 3:11 PM
Subject: Re: Inserting a value in an autoincrement list?


 Richard schrieb:
  I want to have a list of titles to which I can add new ones either at
  the end of the list or in a chosen position so I can choose what order
  they show up in.
 
  The first solution that I thought of was to add one to all of the
  position values heigher than the position I wish to insert the new one
  to. But this would envolve alot of queries and therefore resources.
 
  So now I'm wandering if it is possible to do this directly with mysql.
  Here is an example of what I want to do
  I will have a table called titles like this :
 
  
  table : title
  ---
 POSTITION|   TITLE
 1|   title joejjeo
 2|   title ejuejej
 3|   title ekkke
 4|   title eueoueo
 5|title eehiehiehop
 
 
  And I wish to insert :
 
 3|title inserted
 
  So that titles in positions 3, 4 and 5 become titles 4, 5 and 6


 just two queries:

 UPDATE `title`
 SET `POSTITION` = `POSTITION` + 1
 WHERE `POSTITION`  2;

 INSERT ...;

 --
 Sebastian

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: disconection

2007-10-31 Thread John Dba
Hi 

Check whether u have enabled the safe_updates in the config file.


- Original Message 
From: Mulyadi [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, October 31, 2007 3:22:59 PM
Subject: disconection


- Original Message -
From: Ravi Shanmugam [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, October 31, 2007 3:32 PM
Subject: Problem with upgrade command in mysql.


Hi,

I have a script which updates a mysql table. When I run this script the
update in not happening.
But if I stop mysql and start in safe mode as follows

mysqld_safe --skip-grant-tables --user=root 

then the update script is running properly.

Why it is not happening in the non safe mode.

Could somebody help me. Your help will be appreciated.

Regds,
RSR
SASKEN BUSINESS DISCLAIMER
-
This message may contain confidential, proprietary or legally privileged
information. In
case you are not the original intended Recipient of the message, you must
not, directly or
indirectly, use, Disclose, distribute, print, or copy any part of this
message and you are
requested to delete it and inform the sender. Any views expressed in this
message are
those of the individual sender unless otherwise stated. Nothing contained in
this message
shall be construed as an offer or acceptance of any offer by Sasken
Communication
Technologies Limited (Sasken) unless sent with that express intent and
with due
authority of Sasken. Sasken has taken enough precautions to prevent the
spread of
viruses. However the company accepts no liability for any damage caused by
any virus
transmitted by this email



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Add a replicated DB w/o rebooting the server

2007-10-31 Thread John Dba
Hi,

Master to slave replication.

If a database is created in master and in slave config file if i needs to add 
the 2nd database name to replicate, without restarting the instance in slave it 
is not possible.


Cheers
John_mysql


- Original Message 
From: Oriol Capsada [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2007 3:51:41 PM
Subject: a replicated DB w/o rebooting the server

Hi all,

Everything I have read about adding a new database to a slave 
replication talks about adding a new line in the configuration file (for 
example a replicate-wild-do-table) and then restart the server.

Is it possible to do so without having to reboot the server?

Regards,
Oriol


-- 
MySQL Replication Mailing List
For list archives: http://lists.mysql.com/replication
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Query question.

2007-10-31 Thread Richard Reina
I have a database table paycheck like this.
empno, date, gross,  fed_with
1234 2007-09-01 1153.85 108.26
1323 2007-09-01 461.54 83.08
1289 2007-09-01 1153.85   94.41
1234 2007-09-15 1153.85  108.26
1323 2007-09-15 491.94  87.18
1289 2007-09-15 1153.8594.41


I can easily do a query like this

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where
DATE=2007-09-01;

But then I have to do a query for each pay date in the pay period.

Accordingly, what would be really useful on a day like today would be to be
able to do a query like the following:

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where DATE IS
distinct;

Does anyone know how to do this?

Thanks for the help.

Richard


Re: Query question.

2007-10-31 Thread Joerg Bruehe

Hi Richard,


Richard Reina wrote:

I have a database table paycheck like this.
empno, date, gross,  fed_with
1234 2007-09-01 1153.85 108.26
1323 2007-09-01 461.54 83.08
1289 2007-09-01 1153.85   94.41
1234 2007-09-15 1153.85  108.26
1323 2007-09-15 491.94  87.18
1289 2007-09-15 1153.8594.41


I can easily do a query like this

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where
DATE=2007-09-01;

But then I have to do a query for each pay date in the pay period.

Accordingly, what would be really useful on a day like today would be to be
able to do a query like the following:

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where DATE IS
distinct;

Does anyone know how to do this?


it seems you want to use group by:
SELECT (SUM(gross) * .153) + SUM(fed_with) FROM paycheck GROUP BY date;

See here:
http://dev.mysql.com/doc/refman/5.0/en/select.html
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html

HTH,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Query question.

2007-10-31 Thread Adrian Bruce

you need to group the result sets by date, look at the manual link below:

http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html

Richard Reina wrote:

I have a database table paycheck like this.
empno, date, gross,  fed_with
1234 2007-09-01 1153.85 108.26
1323 2007-09-01 461.54 83.08
1289 2007-09-01 1153.85   94.41
1234 2007-09-15 1153.85  108.26
1323 2007-09-15 491.94  87.18
1289 2007-09-15 1153.8594.41


I can easily do a query like this

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where
DATE=2007-09-01;

But then I have to do a query for each pay date in the pay period.

Accordingly, what would be really useful on a day like today would be to be
able to do a query like the following:

select (SUM(gross) * .153) + SUM(fed_with) FROM paycheck where DATE IS
distinct;

Does anyone know how to do this?

Thanks for the help.

Richard

  



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: query question

2007-10-31 Thread Adrian Bruce

there should be no space between function name and () i.e. it should be

group_concat(hosts.name)

(unless you have the sql mode IGNORE_SPACE set)



Andrey Dmitriev wrote:

I knew I’ve seen this error before ☺

Thanks a lot.

-andrey


From: Peter Brawley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 30, 2007 1:55 AM

To: Andrey Dmitriev
Cc: mysql@lists.mysql.com
Subject: Re: query question

  

Thanks.. It doesn't seem to work though.. I did verify I am on 5.0


Try lose the space after group_concat.

PB

Andrey Dmitriev wrote: 
Thanks.. It doesn't seem to work though.. I did verify I am on 5.0



mysql select service_names.name as 'Service',
- group_concat (hosts.name)
- from monarch.hosts as hosts, monarch.services as services, 
monarch.service_names as service_names

- where
- hosts.host_id=services.host_id
- and service_names.servicename_id=services.servicename_id
- group by service_name.name
-
-
- ;
ERROR 1305 (42000): FUNCTION mysql.group_concat does not exist

-Original Message-
From: Baron Schwartz [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 29, 2007 4:00 PM

To: Andrey Dmitriev
Cc: mysql@lists.mysql.com
Subject: Re: query question

Hi,

Andrey Dmitriev wrote:
  
This is kind of achievable in Oracle in either sqlplus mode, or with 

the
  
use of analytical functions. Or in the worst case by writing a 

function.
  
But basically I have a few tables

Services, Hosts, service_names


And I can have a query something like 



select service_names.name as 'Service', hosts.name as 'Host'
from hosts, services, service_names 
where 
hosts.host_id=services.host_id 
and service_names.servicename_id=services.servicename_id 
order by service_names.name


Which outputs something like

| SSH | mt-ns4 

 
  
|
| SSH | tsn-adm-core   

 
  
|
| SSH | tsn-juno   

 
  
|
| SSH | tsn-tsn2  


However, the desired output is one line per service name, so something
like

| SSH | mt-ns4,
tsn-adm-core, tsn-juno, tsn-tsn2 |


Can this be done w/o writing procedural code in mysql?



Yes.  Have a look at GROUP_CONCAT().

Baron



  



  



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



monitoring utility

2007-10-31 Thread Sharique uddin Ahmed Farooqui
Hi,
I have a website running on Linux based cluster server. We don't have
access to logs, nor we have ssh access.
I want monitor mysql server usage of my site for the purpose of
optimizing my site scripts.
Pls suggest php based application.

-- 
Sharique uddin Ahmed Farooqui
(C++/C# Developer, IT Consultant)
A revolution is about to begin.
A world is about to change.
And you and me are the initiator.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



sporadic error 13 on windows

2007-10-31 Thread Artem Kuchin

I am running
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
on WIndows 2003 R2 Service Pack 2 Standard Edition

I have a database dig perl script with basically does a lot of 
SELECT [somefield] as tt FROM table;



When i run it i get:

DBD::mysql::st execute failed: Can't create/write to file 'C:\Program 
Files\MySQL\MySQL Server 5.0\Data\#sql_bdc_0.MYI' (Errcode
: 13) at cleanfilestore.pl line 89, STDIN line 1.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at cleanfilestore.pl 
line 90, STDIN line 1.
DBD::mysql::st execute failed: Can't create/write to file 'C:\Program 
Files\MySQL\MySQL Server 5.0\Data\#sql_bdc_0.MYI' (Errcode
: 13) at cleanfilestore.pl line 89, STDIN line 1.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at cleanfilestore.pl 
line 90, STDIN line 1.
DBD::mysql::st execute failed: Can't create/write to file '#sql_bdc_0.MYD' (Errcode: 
13) at cleanfilestore.pl line 89, STDIN l
ine 1.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at cleanfilestore.pl 
line 90, STDIN line 1.


I have 
[mysqld]

tmpdir=C:/temp

in my.ini

SO, first of all, why is it trying to create something in Programe files?
Why there are files w/o path at all (Can't create/write to file '#sql_bdc_0.MYD') ? 


These error accure at different moments every time script is run.

Anynow any idea what's going on here?

TEMP has full rights for ALL. But anyway, as you see, it is not even mentioned 
here.

--
Regards,
Artem


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't find file: './mysql/(database_name).frm'

2007-10-31 Thread Tim Johnson
Regarding this issue, I have found that by rebooting the computer,
these problems have gone away (for now). I have a feeling that
this was a subtle permission/ownership problem. Some of the
databases were installed by direct file copy. although this method
has worked well for me on slackware and redhat machines, I'm
going to avoid doing this in the future for ubuntu if I can.
 
On Tuesday 30 October 2007, Warren Young wrote:
 Tim Johnson wrote:
  It isn't broken, per se.
 
When you say that it isn't broken, could you please elaborate?

 Once again: It seems to me that you're seeing a purposeful choice of
 configuration.  It could very well be that the configuration makes sense
 in some one's use.  The fact that it breaks for you doesn't mean the
 configuration makes no sense.

 I don't know for a fact that this is what's going on.  I don't use
 Ubuntu.  I'm just trying to find an explanation for why it is the way it
 is.
Just a quick note regarding ubuntu. To make a long story short, I
moved from slack to ubuntu because of the debian package-management system,
which is inherited by ubuntu. When mysql is installed via the debian package
management system, the binaries being installed have been built and 
maintained by the ubuntu development team. From what I know, this team is
well-funded and very able. And the binaries are built for ubuntu in
the ubuntu way

 ... why then are you continuing to argue back and
 forth instead of going to mysql.com and getting a different set of
 binaries to try?  You could have done that about five times in the time
 it's took to have this exchange.  Even if it didn't work, we'd be
 farther along towards a solution by now.

Not necessarily. Read on:
I own a software development company. I have been a database programmer
for 18 years, I'm proficient in C/C++/assembler/VBA/Python/Rebol/javascript
to name just a few. I've used mysql for 7 years, have built my own DBMSs
from scratch. I've worked on VAX, DOS, windows, Redhat linux, slackware linux
and now ubuntu. I wear the badge of hacker proudly.
*
*but*
*
I believe that in windows, there is a windows way, in redhat, there is a
redhat way  in slackware, there is the slackware way, and in ubuntu
there is the ubuntu way.

I stuck with the ubuntu way because I am now on ubuntu. It is likely that 
using binaries *not* built for ubuntu would just compound the problem.

Given the very, very, large user base of MySQL and the large user base of
ubuntu and the distinct characteristics of the debian package management
system, which is not only used by ubuntu, but by others - it would be worthy
to have a ubuntu(debian)-specific support community for mysql.

Enuff said. I'm done.
Tim

 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]