Diff between restore from tar and recover from power outage

2007-06-04 Thread murthy gandikota
Hi When restoring a DB from a tar file, I had to repair some of the tables. Whereas when the DB is started after a power failure, everything works fine. I noticed this on RedHat linux and MySQL5. Any thoughts? Thanks Murthy - Building a

Re: Should the db be shutdown before backing up?

2007-04-30 Thread murthy gandikota
Gerald L. Clark [EMAIL PROTECTED] wrote: Mathieu Bruneau wrote: murthy gandikota a écrit : Hi I did a hot backup a while ago. When I had to restore from backup there were several error messages. So I ran mysqlcheck for every table with --auto-repair option. Is this the best way

Should the db be shutdown before backing up?

2007-04-29 Thread murthy gandikota
Hi I did a hot backup a while ago. When I had to restore from backup there were several error messages. So I ran mysqlcheck for every table with --auto-repair option. Is this the best way? Thanks Murthy - Ahhh...imagining that irresistible new

Should the db be shutdown before backing up?

2007-04-29 Thread murthy gandikota
Hi I did a hot backup a while ago. When I had to restore from backup there were several error messages. So I ran mysqlcheck for every table with --auto-repair option. Is this the best way? Thanks Murthy - Ahhh...imagining that irresistible new

Re: Is an index on varchar column efficient?

2007-04-17 Thread murthy gandikota
mos [EMAIL PROTECTED] wrote: At 06:23 PM 4/15/2007, you wrote: Hi, I have a table with 2 million records but without an index or a primary key. The column upon which I want to create an index is a varchar. Will it give me any advantage when I have to do a select on the column? BTW, here

Re: Is an index on varchar column efficient?

2007-04-17 Thread murthy gandikota
Baron Schwartz [EMAIL PROTECTED] wrote: murthy gandikota wrote: Hi, I have a table with 2 million records but without an index or a primary key. The column upon which I want to create an index is a varchar. Will it give me any advantage when I have to do a select on the column? BTW

Is an index on varchar column efficient?

2007-04-15 Thread murthy gandikota
Hi, I have a table with 2 million records but without an index or a primary key. The column upon which I want to create an index is a varchar. Will it give me any advantage when I have to do a select on the column? BTW, here is the scenario: create table `test` (`phonenumber`

Re: LEFT/RIGHT Joins not working

2007-04-04 Thread murthy gandikota
, source.source from cust LEFT JOIN source ON (cust.source=source.id) LEFT JOIN disposition ON (cust.disposition=disposition.id); '123456789', 'dispo2', 'source1' '123456780', 'dispo1', 'source2' '123456781', null, null On Wed, April 4, 2007 00:03, murthy gandikota wrote: Hi Mike Thanks for your

LEFT/RIGHT Joins not working

2007-04-03 Thread murthy gandikota
I tried the following 2 SQL's and the results are less than satisfactory. The RIGHT join does not show where disposition is NULL. The LEFT join shows dispositions as NULL where they shouldn't be. Also the LEFT join generates more dupes. Any way to fix this? select cust.first as FIRST,

Re: LEFT/RIGHT Joins not working

2007-04-03 Thread murthy gandikota
/join.html - michael On 4/3/07, murthy gandikota wrote: I tried the following 2 SQL's and the results are less than satisfactory. The RIGHT join does not show where disposition is NULL. The LEFT join shows dispositions as NULL where they shouldn't be. Also the LEFT join generates more dupes. Any

What does NOW() return: linux time or something else?

2007-03-21 Thread murthy gandikota
Hi I tried to look up the time functions specifically for the disparity between NOW() and the linux time obtained with 'date'. Why are they different? How can I set the database time? Thanks Murthy - Looking for earth-friendly autos? Browse Top

Disk parition full

2007-02-26 Thread murthy gandikota
Hi I have looked up earlier postings on disk partitions and mysql and couldn't find any discussion threads. Mysql is storing data in the /usr partition of Redhat 9. The /usr partition is about 50% full. Within a year it will outlast the available space on /usr. The /var partition on

Re: JSP/JSTL problem

2007-01-03 Thread murthy gandikota
(); } catch (Exception e) {} try { stmt.close(); } catch (Exception e) {} try { conn.close(); } catch (Exception e) {} } David murthy gandikota wrote: I tried everything you suggested. 'Think it is the way I have set up the table in MYSQL. This is the table

Re: JSP/JSTL problem

2007-01-02 Thread murthy gandikota
(Customer already exists + Integer.parseInt(ssn)); return; } do insert (not shown) I get the message customer already exists for EVERY ssn that I tried. Hassan Schroeder [EMAIL PROTECTED] wrote: On 12/30/06, murthy gandikota wrote: I am getting

Re: JSP/JSTL problem

2007-01-02 Thread murthy gandikota
PROTECTED] wrote: On 1/2/07, murthy gandikota wrote: ps = con.prepareStatement(select first, last from cust where ssn=?); int ssnint = Integer.parseInt(ssn.trim()); ps.setInt(1, ssnint); ResultSet rs=ps.executeQuery(); if ( rs.next()) { rs.close(); out.println(Customer already exists

Re: JSP/JSTL problem

2006-12-30 Thread murthy gandikota
I am getting the same result in Java code, i.e. the resultset returned is non-null even though the primary key value is not found in the table. Hassan Schroeder [EMAIL PROTECTED] wrote: On 12/29/06, murthy gandikota wrote: I am posting the relevant JSTL code. Just to clarify: you're

JSP/JSTL problem

2006-12-29 Thread murthy gandikota
Hi I have created a table with the following specs: create table `cust` ( `ssn` int(9) NOT NULL PRIMARY KEY, `submitdate` date, `submitto` int(3), `first` varchar(30), `last` varchar(30), `loanAmt` decimal(10,2), `company` int(3),

Can Primary Key be added with ALTER?

2006-10-26 Thread murthy gandikota
Hi I have a table with no primary key. I'd like to make one of the table columns as the primary key. Is it possible do it with ALTER? Is there any other way? Many thanks for your help. Murthy __ Do You Yahoo!? Tired of spam? Yahoo! Mail

Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
Hi Can someone tell me where in the file system to look for the logs? Mysql has been crashing once every hour. Memory is not the issue. This is how I start the mysql: nohup /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/ local/mysql/var --user=mysql

Re: Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
the problem, so please do resolve it The manual page at http://www.mysql.com/doc/en/Crashing.html contains information that should help you find out what is causing the crash. murthy gandikota [EMAIL PROTECTED] wrote: Hi Can someone tell me where in the file system to look for the logs? Mysql has been

Re: Crashing mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)

2006-08-17 Thread murthy gandikota
Looks like I have too many connections to the database. I made sure all the connections are closed after use. Hope this is the fix. Anyone please confirm. Thanks murthy gandikota [EMAIL PROTECTED] wrote: Can someone please help me figure out what's in this mysqld output before crashing

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

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

2006-06-14 Thread murthy gandikota
, 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 ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1

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

2006-06-14 Thread murthy gandikota
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 gandikota wrote: Hi Dan I've set the permissions to 777 for all the files

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

2006-06-14 Thread murthy gandikota
to recreate your tables and move them. HTH. -phpninja -Original Message- From: Dan Buettner [*mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 8:12 AM To: murthy gandikota Cc: mysql@lists.mysql.com Subject: Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1) Murthy

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

2006-06-14 Thread murthy gandikota
note that I am only interested in preserving the schema without the data. Is it possible to just transfer the schema to a new database? Thanks murthy gandikota [EMAIL PROTECTED] wrote: I can't get mysqldump to work. I typed mysql -uuser -ppassword sfg sfgdump.sql The error is ERROR

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

2006-06-14 Thread murthy gandikota
` patterns with `sfgnew`. As you may guess, I don't intend to this often. Why can't we have a tool that copies one DB into another? BTW, I tried create table with select and it didn't work. Michael Stassen [EMAIL PROTECTED] wrote: murthy gandikota wrote: Here are some pertinent facts

ERROR 2013 (HY000): Lost connection to MySQL server during query

2006-06-08 Thread murthy gandikota
Hi, I am getting this error. Can anyone please help? mysql create table sfgbackup.advEmail select * from sfg.advEmail; ERROR 2013 (HY000): Lost connection to MySQL server during query Bye [EMAIL PROTECTED] mgandikota]$ mysql -V mysql Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686) Thanks

Can't CREATE table using SELECT

2006-06-08 Thread murthy gandikota
Hi The following happened when I tried to create table. Can anyone please help? mysql create table sfgbackup.advEmail select * from sfg.advEmail; mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is

MYSQLDUMP uses database name in the SQL statements?????!!!!!!!!!!!

2006-06-08 Thread murthy gandikota
I've checked the dump file I created with mysqldump on a database sfg, and it has statements like the following: DROP VIEW IF EXISTS `advAPI`; CREATE ALGORITHM=UNDEFINED VIEW `sfg`.`advAPI` AS select `sfg`.`advertiser`.`advertiserid` AS `advertiserid`,count(`sfg`.`cust`.`custid`) AS `api` from

TABLE and VIEW have same IDENTIFIER: PLEASE HELP

2006-06-07 Thread murthy gandikota
I created a sql file for database sfg as follows: mysqldump -uuser -ppassword sfg backup.sql Then I tried to reload it in another database sfg2 mysql -uuser -ppassword sfg2 backup.sql I get the error message saying the table already exists. I traced the error to the lines where the views

Copying tables sans data from one database to another

2006-06-07 Thread murthy gandikota
How can I copy tables from one database to another on the same host? Thanks for your help Murthy __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com