stored procedure TYPE

2006-06-14 Thread Ligaya Turmelle
*Disclaimer - this will be kind of vague mainly because I only vaguely recall the material. I am trying to create a stored procedure. Now I vaguely recall reading something that says I have to match a column type if I am messing with one. Something like I want to match a table column type...

Re: Problem With Join Syntax

2006-06-14 Thread Albert Padley
Keith, I agree that would be a good option to change the table. Unfortunately, that's not an option at this point. I don't control the schema. Thanks for the suggestion anyway. Albert Padley On Jun 14, 2006, at 3:59 PM, Keith Roberts wrote: Hi Chris. I cannot see how it can be done wit

RE: Can I have multiple sockets?

2006-06-14 Thread Quentin Bennett
AFAIK, no, you can't do that, but you can have multiple servers on one server, so long as they don't try and control the same data files. Each server could use a different socket. -Original Message- From: Patrick Ben Koetter [mailto:[EMAIL PROTECTED] Sent: Thursday, 15 June 2006 3:04 a.m

Re: Trouble with read-only

2006-06-14 Thread Ludwig Pummer
Rod Heyd wrote: Hello, I'm trying to set up a replication slave as read-only, but the read-only part doesn't seem to be working. Replication between the master and the slave works fine. I have added the read-only keyword to the slave's my.cnf, and looking at the output of show variables indica

Re: Differences between MySQL 4 and 5 for scripts

2006-06-14 Thread Jim Winstead
On Wed, Jun 14, 2006 at 11:00:36PM +0100, Graham Reeds wrote: > Dan Buettner wrote: > >Graham, I seem to recall those single quote marks working without a > >problem on various platforms and versions of MySQL. Of course they are > > generally just a nicety and only required if you are using rese

Re: Problem With Join Syntax

2006-06-14 Thread Keith Roberts
Hi Chris. I cannot see how it can be done with the current table schema. Maybe you need to redeclare your table so the values in the value column are more distinct? What is value supposed to contain anyway? First name, last name and email address? What about a structure like: id | userid | i

Re: Differences between MySQL 4 and 5 for scripts

2006-06-14 Thread Graham Reeds
Dan Buettner wrote: Graham, I seem to recall those single quote marks working without a problem on various platforms and versions of MySQL. Of course they are generally just a nicety and only required if you are using reserved words as table/column/key names, so you could just remove them ent

RE: Join help

2006-06-14 Thread Tim Lucia
You want a LEFT (OUTER) JOIN, which will return nulls for the columns if no match on the join expression. -Original Message- From: Paul Nowosielski [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 4:44 PM To: mysql@lists.mysql.com Subject: Join help Dear All, I'm working on a

Join help

2006-06-14 Thread Paul Nowosielski
Dear All, I'm working on a database that has a lot of inconsistencies. I have a large query that pulls artist and venue information. My problem is this: I'm trying to create a data feed that lists artists tour dates, and the relation venue information corresponding to that tour date. Unfortunat

Re: Time of entry updates?

2006-06-14 Thread Brent Baisley
You need to have a field in your table that is a timestamp. The first field that is a timestamp field will always have the most recent modification date & time. http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html - Original Message - From: "Thomas Amundsen" <[EMAIL PROTECTED]> To

Re: Problem With Join Syntax

2006-06-14 Thread Albert Padley
Dan, Thanks. I'll take a further look at GROUP_CONCAT. Albert On Jun 14, 2006, at 1:16 PM, Dan Buettner wrote: Albert, MySQL's GROUP_CONCAT function might work for you: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html In your case something like this: SELECT userid, GROUP_CON

RE: Reset (or Defrag) the AUTO_INCREMENT columns

2006-06-14 Thread Daevid Vincent
I keep this little chart tacked to my wall: # BIGINTUNSIGNED = 8 Byte = = 18446744073709551615 # INT UNSIGNED = 4 Byte = = 4294967295 # MEDIUMINT UNSIGNED = 3 Byte = FF = 16777215 # SMALLINT UNSIGNED = 2 Byte = = 65535 # TINYINT UNSIGNED =

Re: Trouble with read-only

2006-06-14 Thread Rod Heyd
On 6/14/06, ravilr <[EMAIL PROTECTED]> wrote: Are you inserting rows as a root user? The root user will be able to write to tables even if read-only is set to 'ON'. Ah, yes. That was it. I forgot about that. Thanks. -Rod

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
Hi Micheal Thanks for your suggestions. I use mysqldump to restore the DB's. Apparently mysqldump doesn't create forward declarations for views. So I had to manually feed the views in correct order to avoid errors. Also to import the DB sfg into sfgnew I had to substitute all of the `sfg` patt

Re: Problem With Join Syntax

2006-06-14 Thread Dan Buettner
Albert, MySQL's GROUP_CONCAT function might work for you: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html In your case something like this: SELECT userid, GROUP_CONCAT(value) GROUP BY userid HTH, Dan Albert Padley wrote: I have the following table schema in MySQL 4.1.18 which I

Re: intended behavior of host %

2006-06-14 Thread James Barros
Never mind. I'll just go RTFM and quit bugging you guys on list with stuff answered plain as day in http://dev.mysql.com/doc/refman/5.1/en/adding-users.html Sorry. I'll go caffeinate myself before asking more stupid questions. -- James On Jun 14, 2006, at 11:55 AM, James Barros wrote: Hey

Re: Replicating queries to testing server

2006-06-14 Thread Dan Trainor
Atle Veka wrote: Replicating a live setup, especially one running on the web is extremely difficult if not near impossible. Assuming you don't have the freedom to stop/start your mysqld for tuning/tweaking, here are some things you can do: - Enable slow-query-log - Enable query log - Query proces

intended behavior of host %

2006-06-14 Thread James Barros
Hey guys, I'm running mysql 5.1.9 and I've got a user who's mysql.user host is set to "%" and can log in from any domain except localhost. if I change to localhost, and flush privileges they can log in. Is this intended behavior, or should % be inclusive of localhost? -- MySQL General Ma

Time of entry updates?

2006-06-14 Thread Thomas Amundsen
Is there any way to find the time of the most recent update for a row?

Re: Problem With Join Syntax

2006-06-14 Thread Chris White
On Wednesday 14 June 2006 10:55 am, Albert Padley wrote: > A typical set of data looks like this: > > id | inputfieldid | userid | value > 1 1 2 John > 2 2 2 Smith > 3 3 2 [EMAIL PROTECTED] > > I am trying to come up with a query

Re: Trouble with read-only

2006-06-14 Thread ravilr
Are you inserting rows as a root user? The root user will be able to write to tables even if read-only is set to 'ON'. --Ravi Rod Heyd wrote: Hello, I'm trying to set up a replication slave as read-only, but the read-only part doesn't seem to be working. Replication between the master and th

Re: Replicating queries to testing server

2006-06-14 Thread Atle Veka
Replicating a live setup, especially one running on the web is extremely difficult if not near impossible. Assuming you don't have the freedom to stop/start your mysqld for tuning/tweaking, here are some things you can do: - Enable slow-query-log - Enable query log - Query processlist periodically

Problem With Join Syntax

2006-06-14 Thread Albert Padley
I have the following table schema in MySQL 4.1.18 which I didn't create, but have to work with. CREATE TABLE `phplog_userinput` ( `id` int(11) NOT NULL auto_increment, `inputfieldid` int(11) NOT NULL default '0', `userid` int(11) NOT NULL default '0', `value` varchar(150) NOT NULL defau

Trouble with read-only

2006-06-14 Thread Rod Heyd
Hello, I'm trying to set up a replication slave as read-only, but the read-only part doesn't seem to be working. Replication between the master and the slave works fine. I have added the read-only keyword to the slave's my.cnf, and looking at the output of show variables indicates that read-onl

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Michael Stassen
murthy gandikota wrote: > Here are some pertinent facts: > a) stopped mysqld > b) copied files from sfg to sfgnew in the var directory > c) set the permissions to 777 (read, write, execute) for all the files in sfgnew > d) restarted mysqld Dan Buettner wrote: > Murthy, do you have

RE: Unknown tables

2006-06-14 Thread Duzenbury, Rich
> -Original Message- > From: Jesse [mailto:[EMAIL PROTECTED] > Sent: Monday, June 12, 2006 1:48 PM > To: MySQL List > Subject: Unknown tables > > When I do a SHOW TABLES in MySQL, it shows me a list of tables. But when > I > try to do a "select * from countries", I get the error ERROR 1

Re: Differences between MySQL 4 and 5 for scripts

2006-06-14 Thread Michael Stassen
Graham Reeds wrote: I have posted a similar question on the blojsom group but I feel I will have better chance of an answer here. Blojsom 3 was developed using MySQL5 for it's back end. However the host I am with uses 4.0.25 and are unwilling to upgrade - which is fair enough. So I decided

How to split output from SHOW SLAVE STATUS?

2006-06-14 Thread Jacek Becla
Hi, I'm trying to find how to split the output from SHOW SLAVE STATUS into individual fields. Specifically, I would like to be able to do in a stored function: 1) determine what the status of slave is, and if it is "Waiting for master to send event", do some action, like stop the slave 2) e

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Dan Buettner
Murthy, if you want to dump database A and restore into database B, it's basically a 3-step process. You have to first create B, then dump A, then pipe the dump of A into B. Using the --no-data option with mysqldump will dump only structure, no data. something like this: mysql -u root -psec

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Paul DuBois
At 6:14 -0700 6/14/06, murthy gandikota wrote: I'm getting the following error ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1) This is the output from mysqld 060613 19:59:34 InnoDB error: Cannot find table sfgnew/agent from the internal data dictionary of InnoDB thoug

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
Error 2013 went away when I typed "create database sfg" at the mysql client prompt before loading the dump. I have asked this before. Let me try again. How can I take the dump of a database db1 and load it into another database db2 on the same host? If this looks like a backup operation, pleas

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
I can't get mysqldump to work. I typed mysql -uuser -ppassword sfg < sfgdump.sql The error is ERROR 2013 (HY000): Lost connection to MySQL server during query phpninja <[EMAIL PROTECTED]> wrote: I prefer the mysqldump utility for transfering data. Its pretty fast (if your tables are no

Re: Can I have multiple sockets?

2006-06-14 Thread Paul DuBois
I have an application (Postfix) I want to run chrooted. When I do run it chrooted it will not be able to "see" the MySQL UNIX domain socket at it's default location. (I could use a TCP socket, but I don't want to...) Is there a way I can tell MySQL to establish multiple sockets e.g. a socket per

Re: Password problems using Mac OS X

2006-06-14 Thread Kevin Felix
Dan, A thousand times thanks for the fast reply, I just reset my password with MySQL Administrator now, everything is back the way it was! On a sidenote: I also saw this as the version "MySQL 5.0.17-max via socket". The version 3 was through phpinfo(). My php install and other MySQL do al

Re: Password problems using Mac OS X

2006-06-14 Thread Dan Buettner
Kevin - You can start up the MySQL server without password protection using the --skip-grant-tables option. Note that will leave your server wide open, so you may also want to use the --skip-networking option and access it through the socket on the same machine. Something like this I think:

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread phpninja
I prefer the mysqldump utility for transfering data. Its pretty fast (if your tables are not huge gigabytes in size).. and preserves you tables/data just as they were when you moved them. As far as I know, copying data on the filesystem level in mysql does not work. You cannot copy data files some

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Dan Buettner
Murthy, doing some quick reading on InnoDB table definitions, it appears that MySQL itself keeps some info in the .frm file, while InnoDB keeps some info within the tablespace. While you can easily move MyISAM table files about amongst MySQL database directories (mind you stop the server and t

Can I have multiple sockets?

2006-06-14 Thread Patrick Ben Koetter
I have an application (Postfix) I want to run chrooted. When I do run it chrooted it will not be able to "see" the MySQL UNIX domain socket at it's default location. (I could use a TCP socket, but I don't want to...) Is there a way I can tell MySQL to establish multiple sockets e.g. a socket per d

Password problems using Mac OS X

2006-06-14 Thread Kevin Felix
Hi all, I've been using MySQL for over a year now and I didn't install anything special recently, yet I suddenly find myself locked out of MySQL. I'm using version 3.23.49 and I'm running Mac OS 10.4.6 fully up-to- date. I normally connect using the root-user but this afternoon I first

Mysql 5.0.18 and Suse 9.1

2006-06-14 Thread Diego Ramos
Hi list. I'm using mysql 5.0.18(max) on a DELL PowerEdge 1600 with Suse 9.1Professional, I noticed that the mysql process is always with 99,9% of CPU utilization and the system load average sometimes qets up to 12.5. I was wondering with it is normal. Should I upgrade it to a newer mysql vers

transaction question

2006-06-14 Thread Konrad Baginski
Hi. I have a few questions regarding the transaction levels in mysql 5.0.20 using InnoDB tables. we are trying to populate two tables in the two following ways, we thought that they would be equivalent, apparently they are not. have a look at the following (questions last). FIRST METHOD: =

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
Hi Dan The table was never dropped. I removed the agent.frm file and tried. Here is the output: mysql> desc agent; ERROR 1146 (42S02): Table 'sfgn.agent' doesn't exist Dan Buettner <[EMAIL PROTECTED]> wrote: Is the 'agent' table a current table, or one that got dropped at some point? Se

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Dan Buettner
Is the 'agent' table a current table, or one that got dropped at some point? See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict.html The last half seems relevant - it's pointing you to removing the .frm file manually. Personally, I'd mv it and not rm it. Dan murthy

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
Hi Dan I've set the permissions to 777 for all the files and directories. Basically I did chmod -R 777 sfgnew. Also changed the ownership to mysql using chown -R mysql:mysql sfgnew. Thanks! Dan Buettner <[EMAIL PROTECTED]> wrote: Murthy, do you have appropriate permissions (777 works,

Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread Dan Buettner
Murthy, do you have appropriate permissions (777 works, or 775/770 if owned by mysql user) on your new directory ('sfgnew')? If you don't have execute permission for the mysql user on that dir, MySQL can't list the contents ... Dan murthy gandikota wrote: I'm getting the following error

transaction isolation level

2006-06-14 Thread Konrad Baginski
Hi. I have a few questions regarding the transaction levels in mysql 5.0.20 using InnoDB tables. we are trying to populate two tables in the two following ways, we thought that they would be equivalent, apparently they are not. have a look at the following (questions last). FIRST METHOD: =

ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

2006-06-14 Thread murthy gandikota
I'm getting the following error ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1) This is the output from mysqld 060613 19:59:34 InnoDB error: Cannot find table sfgnew/agent from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe yo

Re: Differences between MySQL 4 and 5 for scripts

2006-06-14 Thread Dan Buettner
Graham, I seem to recall those single quote marks working without a problem on various platforms and versions of MySQL. Of course they are generally just a nicety and only required if you are using reserved words as table/column/key names, so you could just remove them entirely. Could you po

Announcing the MySQL Journal

2006-06-14 Thread Sam Flywheel
Hello, all: I am pleased to announce that the MySQL Journal is moving forward. During the past two weeks, I've been discussing the journal with MySQL AB, and the plan that's been devised benefits all involved, including authors, readers, the community, and MySQL AB. Let me outline how th

Announcing the MySQL Journal

2006-06-14 Thread Sam Flywheel
Hello, all: I am pleased to announce the MySQL Journal. During the past two weeks, I've been discussing the journal with MySQL AB, and the plan that's been devised benefits all involved, including authors, readers, the community, and MySQL AB. Let me outline how the journal will operate:

New Connector/ODBC chapter on-line

2006-06-14 Thread Stefan Hinz
We have done a complete rewrite of the Connector/ODBC docs - making this one of the best chapters in the MySQL Reference Manual: - http://dev.mysql.com/doc/refman/5.1/en/myodbc-connector.html Some of the pages you should look at include: - http://dev.mysql.com/doc/refman/5.1/en/myodbc-installat

Differences between MySQL 4 and 5 for scripts

2006-06-14 Thread Graham Reeds
I have posted a similar question on the blojsom group but I feel I will have better chance of an answer here. Blojsom 3 was developed using MySQL5 for it's back end. However the host I am with uses 4.0.25 and are unwilling to upgrade - which is fair enough. So I decided to see what I can do

ANN: Multi DBMS tool "Database Workbench" version 2.8.7 released

2006-06-14 Thread Martijn Tonies
st of features and fixes: http://www.upscene.com/news/20060614.htm Database Workbench supports: - Borland InterBase ( 4.x - 7.x ) - Firebird ( 1.x, 2.0 ) - MS SQL Server/MSDE ( v6.5, 7, 2000, 2005, MSDE 1 & 2, SQL Express ) - MySQL 4, 4.1, 5.0 - Oracle Database ( 8i, 9i, 10g ) - NexusDB ( 2.05

Re: Reset (or Defrag) the AUTO_INCREMENT columns

2006-06-14 Thread Marco Simon
Hi wolverine, of course you could "defrag" your autoincrement-values, but there's no automation for that - you've do do that via normal insert/update statements. Perhaps you'll need an intermediate table. But: In most cases the autoincrement-value is used as an id (as in your case) - in db-langua