Re: MYSQL PROCESS

2008-08-13 Thread Ananda Kumar
Is it possible to shutdown and restart mysql again, if its not in
production.

regards
anandkl


On 8/14/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I am running mysql on debian. I didn't understand why there is a lots of
> mysql process running. There should be only one mysql process running.
> Please help me that what should i do. Although there is no problem with
> mysql server.
>
> debian:~# ps axu
> USER   PID %CPU %MEM   VSZ  RSS TTY  STAT START   TIME COMMAND
> root 1  0.0  0.0  1400  472 ?SJun03   0:03 init [2]
> root 2  0.0  0.0 00 ?SJun03   0:01 [keventd]
> root 3  0.0  0.0 00 ?SN   Jun03   0:06
> [ksoftirqd_CPU0]
> root 4  0.0  0.0 00 ?SJun03   2:25 [kswapd]
> root 5  0.0  0.0 00 ?SJun03   0:00 [bdflush]
> root 6  0.0  0.0 00 ?SJun03   1:15 [kupdated]
> root99  0.0  0.0 00 ?SJun03   6:52 [kjournald]
> root   250  0.0  0.0 00 ?SJun03   0:00 [kcopyd]
> root   252  0.0  0.0 00 ?SJun03   0:00 [kmirrord]
> root   265  0.0  0.0 00 ?SJun03   0:00 [kjournald]
> root   431  0.0  0.0 00 ?SJun03   0:00 [khubd]
> root  1247  0.0  0.0  1456  600 ?Ss   Jun03   0:04
> /sbin/syslogd
> root  1250  0.0  0.0  2084  444 ?Ss   Jun03   0:00 /sbin/klogd
> root  1288  0.0  0.1  2432 1024 ?SJun03   0:00 /bin/sh
> /usr/bin/mysqld_safe
> mysql 1325  0.0 27.1 324124 262548 ? SJun03   0:31
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1336  0.0 27.1 324124 262548 ? SJun03   0:03
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1337  0.0 27.1 324124 262548 ? SJun03   0:00
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1338  0.0 27.1 324124 262548 ? SJun03   0:01
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1339  0.0 27.1 324124 262548 ? SJun03  16:49
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1340  0.0 27.1 324124 262548 ? SJun03   0:30
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1369  0.0 27.1 324124 262548 ? SJun03   6:10
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1370  0.0 27.1 324124 262548 ? SJun03   3:32
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1380  0.0 27.1 324124 262548 ? SJun03   1:16
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1381  0.0 27.1 324124 262548 ? SJun03   0:08
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 1384  0.0 27.1 324124 262548 ? SJun03   5:33
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> root  1431  0.0  0.1  4736 1560 ?Ss   Jun03   1:23
> /usr/sbin/sshd
>
> .
> .
> .
> ..
> .
>
> mysql 3404  0.0 27.1 324124 262548 ? SJun04   3:22
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 3456  0.0 27.1 324124 262548 ? SJun04   3:06
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 3607  0.0 27.1 324124 262548 ? SJun04   3:24
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 3685  0.0 27.1 324124 262548 ? SJun04   2:25
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5325  0.0 27.1 324124 262548 ? SJun05   3:14
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5352  0.0 27.1 324124 262548 ? SJun05   3:21
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5374  0.0 27.1 324124 262548 ? SJun05   3:16
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5378  0.0 27.1 324124 262548 ? SJun05   3:06
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5397  0.0 27.1 324124 262548 ? SJun05   2:49
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5398  0.0 27.1 324124 262548 ? SJun05   2:51
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
> mysql 5400  0.0 27.1 324124 262548 ? SJun05   3:35
> /usr/sbin/mysqld --basedir=/usr --datadir=/var/
>
>
> --
> Krishna Chandra Prajapati
> MySQL DBA,
> Ed Ventures e-Learning Pvt.Ltd.
> 1-8-303/48/15, Sindhi Colony
> P.G.Road, Secunderabad.
> Pin Code: 53
> Office Number: 040-66489771
> Mob: 9912924044
> URL: ed-ventures-online.com
> Email-id: [EMAIL PROTECTED]
>


Re: looking for "ready made" address management

2008-08-13 Thread robert rottermann

Jerry Schwartz schrieb:

I strongly advise you to use an off-the-shelf solution. In fact, if you can
afford it you should go with a CRM vendor. They will have all kinds of
features, such as address duplication detection, that you will need.


you are of course perfectly right,
however I need it as base of a bigger scenario (as part of a event/document 
managementsystem based on zope/plone).

robert


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



MYSQL PROCESS

2008-08-13 Thread Krishna Chandra Prajapati
Hi all,

I am running mysql on debian. I didn't understand why there is a lots of
mysql process running. There should be only one mysql process running.
Please help me that what should i do. Although there is no problem with
mysql server.

debian:~# ps axu
USER   PID %CPU %MEM   VSZ  RSS TTY  STAT START   TIME COMMAND
root 1  0.0  0.0  1400  472 ?SJun03   0:03 init [2]
root 2  0.0  0.0 00 ?SJun03   0:01 [keventd]
root 3  0.0  0.0 00 ?SN   Jun03   0:06
[ksoftirqd_CPU0]
root 4  0.0  0.0 00 ?SJun03   2:25 [kswapd]
root 5  0.0  0.0 00 ?SJun03   0:00 [bdflush]
root 6  0.0  0.0 00 ?SJun03   1:15 [kupdated]
root99  0.0  0.0 00 ?SJun03   6:52 [kjournald]
root   250  0.0  0.0 00 ?SJun03   0:00 [kcopyd]
root   252  0.0  0.0 00 ?SJun03   0:00 [kmirrord]
root   265  0.0  0.0 00 ?SJun03   0:00 [kjournald]
root   431  0.0  0.0 00 ?SJun03   0:00 [khubd]
root  1247  0.0  0.0  1456  600 ?Ss   Jun03   0:04 /sbin/syslogd
root  1250  0.0  0.0  2084  444 ?Ss   Jun03   0:00 /sbin/klogd
root  1288  0.0  0.1  2432 1024 ?SJun03   0:00 /bin/sh
/usr/bin/mysqld_safe
mysql 1325  0.0 27.1 324124 262548 ? SJun03   0:31
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1336  0.0 27.1 324124 262548 ? SJun03   0:03
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1337  0.0 27.1 324124 262548 ? SJun03   0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1338  0.0 27.1 324124 262548 ? SJun03   0:01
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1339  0.0 27.1 324124 262548 ? SJun03  16:49
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1340  0.0 27.1 324124 262548 ? SJun03   0:30
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1369  0.0 27.1 324124 262548 ? SJun03   6:10
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1370  0.0 27.1 324124 262548 ? SJun03   3:32
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1380  0.0 27.1 324124 262548 ? SJun03   1:16
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1381  0.0 27.1 324124 262548 ? SJun03   0:08
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 1384  0.0 27.1 324124 262548 ? SJun03   5:33
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
root  1431  0.0  0.1  4736 1560 ?Ss   Jun03   1:23
/usr/sbin/sshd

.
.
.
..
.

mysql 3404  0.0 27.1 324124 262548 ? SJun04   3:22
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 3456  0.0 27.1 324124 262548 ? SJun04   3:06
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 3607  0.0 27.1 324124 262548 ? SJun04   3:24
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 3685  0.0 27.1 324124 262548 ? SJun04   2:25
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5325  0.0 27.1 324124 262548 ? SJun05   3:14
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5352  0.0 27.1 324124 262548 ? SJun05   3:21
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5374  0.0 27.1 324124 262548 ? SJun05   3:16
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5378  0.0 27.1 324124 262548 ? SJun05   3:06
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5397  0.0 27.1 324124 262548 ? SJun05   2:49
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5398  0.0 27.1 324124 262548 ? SJun05   2:51
/usr/sbin/mysqld --basedir=/usr --datadir=/var/
mysql 5400  0.0 27.1 324124 262548 ? SJun05   3:35
/usr/sbin/mysqld --basedir=/usr --datadir=/var/


-- 
Krishna Chandra Prajapati
MySQL DBA,
Ed Ventures e-Learning Pvt.Ltd.
1-8-303/48/15, Sindhi Colony
P.G.Road, Secunderabad.
Pin Code: 53
Office Number: 040-66489771
Mob: 9912924044
URL: ed-ventures-online.com
Email-id: [EMAIL PROTECTED]


Re: Help with query to remove all records where foreign key doesn't have corresponding records

2008-08-13 Thread Brent Baisley

Just do a left join with the delete query.

DELETE feed_tag FROM feed_tag LEFT JOIN feed ON  
feed_tag.feed_id=feed.id WHERE feed.id IS NULL


That should do it. You can change "DELETE feed_tag" to "SELECT" and  
test it first.


--
Brent Baisley


On Aug 13, 2008, at 4:51 PM, Daevid Vincent wrote:

I want to remove all records from 'feed_tag' where the feed_id  
foreign key

doesn't have any corresponding records in feed.

For instance I may have a record in feed_tag that is like (23, 10,  
4543,

'... (some date)').

Then lets say there is no record in feed that has a primary id key  
of 10.


I want that record (or usually records because of the 1 feed to many
feed_tag relationship) to be removed.

CREATE TABLE IF NOT EXISTS `feed` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) default NULL,
  `url` varchar(255) default NULL,
  `host` varchar(100) default NULL,
  `type` varchar(100) default NULL,
  `status` char(1) default NULL,
  `total_stories` int(11) default '0',
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE IF NOT EXISTS `feed_tag` (
  `id` int(11) NOT NULL auto_increment,
  `feed_id` int(11) default NULL,
  `tag_id` int(11) default NULL,
  `created_at` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `feed_tag_FI_1` (`feed_id`),
  KEY `feed_tag_FI_2` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

As you can see the foreign key 'feed_id' is the issue here (ignore the
tag_id key).


--
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: Help with query to remove all records where foreign key doesn't have corresponding records

2008-08-13 Thread Isart Montane
Hi Daevid

If you are using a foreign key you can set the reference as "cascade"
and when a row is deleted from feed it will be deleted from feed_tag.

http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html

If you don't like it you can delete it easy with a query like this

delete from feed_tag where id not in (select id from tag)


Best,
Isart



On Wed, Aug 13, 2008 at 5:51 PM, Daevid Vincent <[EMAIL PROTECTED]> wrote:
> I want to remove all records from 'feed_tag' where the feed_id foreign key
> doesn't have any corresponding records in feed.
>
> For instance I may have a record in feed_tag that is like (23, 10, 4543,
> '... (some date)').
>
> Then lets say there is no record in feed that has a primary id key of 10.
>
> I want that record (or usually records because of the 1 feed to many
> feed_tag relationship) to be removed.
>
> CREATE TABLE IF NOT EXISTS `feed` (
>   `id` int(11) NOT NULL auto_increment,
>   `title` varchar(100) default NULL,
>   `url` varchar(255) default NULL,
>   `host` varchar(100) default NULL,
>   `type` varchar(100) default NULL,
>   `status` char(1) default NULL,
>   `total_stories` int(11) default '0',
>   `created_at` datetime default NULL,
>   `updated_at` datetime default NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
>
> CREATE TABLE IF NOT EXISTS `feed_tag` (
>   `id` int(11) NOT NULL auto_increment,
>   `feed_id` int(11) default NULL,
>   `tag_id` int(11) default NULL,
>   `created_at` datetime default NULL,
>   PRIMARY KEY  (`id`),
>   KEY `feed_tag_FI_1` (`feed_id`),
>   KEY `feed_tag_FI_2` (`tag_id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
>
> As you can see the foreign key 'feed_id' is the issue here (ignore the
> tag_id key).
>
>
> --
> 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]



Help with query to remove all records where foreign key doesn't have corresponding records

2008-08-13 Thread Daevid Vincent
I want to remove all records from 'feed_tag' where the feed_id foreign key
doesn't have any corresponding records in feed. 

For instance I may have a record in feed_tag that is like (23, 10, 4543,
'... (some date)'). 

Then lets say there is no record in feed that has a primary id key of 10. 

I want that record (or usually records because of the 1 feed to many
feed_tag relationship) to be removed.

CREATE TABLE IF NOT EXISTS `feed` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) default NULL,
  `url` varchar(255) default NULL,
  `host` varchar(100) default NULL,
  `type` varchar(100) default NULL,
  `status` char(1) default NULL,
  `total_stories` int(11) default '0',
  `created_at` datetime default NULL,
  `updated_at` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

CREATE TABLE IF NOT EXISTS `feed_tag` (
  `id` int(11) NOT NULL auto_increment,
  `feed_id` int(11) default NULL,
  `tag_id` int(11) default NULL,
  `created_at` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `feed_tag_FI_1` (`feed_id`),
  KEY `feed_tag_FI_2` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

As you can see the foreign key 'feed_id' is the issue here (ignore the
tag_id key). 


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



MyQuery 1.1 alpha available

2008-08-13 Thread Anders Karlsson

All!

To being with, sorry for crossposting, but I felt that there might be an 
interest with both the General as well as the Win32 MySQL mailing lists.


This email is just a heads-up that I have now made my MySQL Script tool 
available as Open Source. It has been going on and off for quite a 
while, but I am now ready to release it in Alpha form.


What this tool is, in short, is a tool for running, checking and fixing 
MySQL scripts in a more interactive fashion than what is possible with 
the mysql commandprompt. The latter is still faster, no doubt, but 
MyQuery has some features for running the scripts that are useful I think.
To being with, is uses the same format as the MySQL commandline tool, 
including using the USE and DELIMITER commands, and any of the usual SQL 
commands of course.

The added features consists of, but aren't limited to:
- Interactive execution: You see the statements being executed and the 
progress is also shown.
- Interactive stop when there is an error, fix the problem, and then 
continue to run.

- During development, run up to a specific point in the script.
- Support for INSERT/UPDATE and SELECT of BLOBs using drag and drop.

This is currently a Windows only tool, developed in C for the Win32 API, 
so anything else is some time off. As the editor, I currently use the 
Rich Edit control, which is hardly optimal for this. Scintilla support 
is being considered here.


It is available on Sourceforge at 
https://sourceforge.net/projects/myquery/ and there is sourcecode or a 
complete Windows Installer or the documentation in PDF format. The 
latter is included with the Windows installer.


Well, that's it for now, happy programming
/Karlsson

--
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Anders Karlsson ([EMAIL PROTECTED])
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/  /_/\_, /___/\___\_\___/ Stockholm
   <___/   www.mysql.com Cellphone: +46 708 608121
  Skype: drdatabase



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



Re: good books or URL for mysql sql tunning

2008-08-13 Thread Perrin Harkins
On Wed, Aug 13, 2008 at 7:30 AM, Ananda Kumar <[EMAIL PROTECTED]> wrote:
> Can u please guide me to any good books or URL for mysql sql tunning..

http://www.highperfmysql.com/

- Perrin

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



Re: Replication between debian and fedora box

2008-08-13 Thread Michael Dykman
Absolutely...  replication is designed to work across heterogenous
systems: I used to work at a place that ran replication from  Mac OS/X
-on a G5G5 to BSD on x86 in production with no particular issues.
There were no extra magic steps.

Having said that, debian and fedora are flavours of the same OS - linux,

 - michael dykmsn



On Wed, Aug 13, 2008 at 4:30 AM, Krishna Chandra Prajapati
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is it possible to create replication between debian and fedora box.
>
> --
> Krishna Chandra Prajapati
>



-- 
 - michael dykman
 - [EMAIL PROTECTED]

 - All models are wrong. Some models are useful.

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



Re: good books or URL for mysql sql tunning

2008-08-13 Thread Darryle Steplight
Hi Anada,

I recommend MySQL Database Design and Tuning by Robert Schineider. It
covers everything from benchmark testing to Innodb Performance
Enhancements. I'm 85% done with the book myself. It shows and explains
good command-line and MySql Admin tool examples. The techniques
discuss in this book are definitely key for large scaling
applications.

On Wed, Aug 13, 2008 at 7:30 AM, Ananda Kumar <[EMAIL PROTECTED]> wrote:
> Hi All,
> Can u please guide me to any good books or URL for mysql sql tunning..
>
> regards
> anandkl
>

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



Re: WAMP question ...

2008-08-13 Thread Ananda Kumar
If you have both myisam and innodb.
You need to ensure sql's from myisam and sql's from innodb have sufficient
memory to run.

you can allocate 25% of you RAM to key_buffer used exclusively for myisam
and around 60% of your RAM to innodb_buffer_pool for supporting innodb .

Also there are other myisam parameters like myisam_sort_buffer_size which u
need to set.

regards
anandkl


On 8/13/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> Hello and Greetings mysql,
>
> I have been running a WAMP server for some time on my Windows XP Pro
> box. Over time I have gone through some issues about which WAMP to use
> and last Year converted my Apache2Triad installation to WAMP5. All of
> my database installations, out of preference, have been MYISAM as I
> didn't see the need for INNODB on my local system. In fact, when I did
> the WAMP5 installation, it defaulted to INNODB and I reconfigured it
> to be MYISAM.
>
> I recently discovered that WAMP5 is now simply WAMPSERVER and its
> pretty much plug and play with a bunch of "customization" modules that
> you can generate pretty much any combination of installations you can
> possibly want. I simply chose the default as I like to try to keep
> things simple which means that I am now running an INNODB server. I
> have not noticed any problems with all the MYISAM databases either
> running locally or uploading them to my live server and am wondering
> what the possible implications are for mixing and matching structures.
> I see now that if I add a table to an MYISAM database, it gets added
> as an INNODB table so I have a mix and match in the same database.
>
> Do I need to be worrying about this? What are the consequences?
> Everything seems to work.
>
> TIA for any wisdom.
>
> --
> Best regards,
> mikesz  mailto:[EMAIL PROTECTED]
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>
>


WAMP question ...

2008-08-13 Thread mikesz
Hello and Greetings mysql,

I have been running a WAMP server for some time on my Windows XP Pro
box. Over time I have gone through some issues about which WAMP to use
and last Year converted my Apache2Triad installation to WAMP5. All of
my database installations, out of preference, have been MYISAM as I
didn't see the need for INNODB on my local system. In fact, when I did
the WAMP5 installation, it defaulted to INNODB and I reconfigured it
to be MYISAM.

I recently discovered that WAMP5 is now simply WAMPSERVER and its
pretty much plug and play with a bunch of "customization" modules that
you can generate pretty much any combination of installations you can
possibly want. I simply chose the default as I like to try to keep
things simple which means that I am now running an INNODB server. I
have not noticed any problems with all the MYISAM databases either
running locally or uploading them to my live server and am wondering
what the possible implications are for mixing and matching structures.
I see now that if I add a table to an MYISAM database, it gets added
as an INNODB table so I have a mix and match in the same database.

Do I need to be worrying about this? What are the consequences?
Everything seems to work.

TIA for any wisdom.

-- 
Best regards,
 mikesz  mailto:[EMAIL PROTECTED]


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



good books or URL for mysql sql tunning

2008-08-13 Thread Ananda Kumar
Hi All,
Can u please guide me to any good books or URL for mysql sql tunning..

regards
anandkl


Re: Slow mysql connections

2008-08-13 Thread Raj Shekhar

in infinite wisdom Ananda Kumar spoke thus  On 08/13/2008 04:37 PM:

Hi Raj,
In which path the trace file would be created.


In your current path itself.

Or just do
   strace  -o /tmp/mysql.strace  -T   mysql -u root -h host -p

The "mysql -u root -h host -ppassword" is the command which you want to 
strace.


--
raj shekhar
facts: http://rajshekhar.net
opinions: http://rajshekhar.net/blog
I've never made anyone's life easier and you know it!

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



Re: Slow mysql connections

2008-08-13 Thread Ananda Kumar
Thank u very much.

regards
anandkl


On 8/13/08, Raj Shekhar <[EMAIL PROTECTED]> wrote:
>
> in infinite wisdom Ananda Kumar spoke thus  On 08/13/2008 04:37 PM:
>
>> Hi Raj,
>> In which path the trace file would be created.
>>
>
> In your current path itself.
>
> Or just do
>   strace  -o /tmp/mysql.strace  -T   mysql -u root -h host -p
>
> The "mysql -u root -h host -ppassword" is the command which you want to
> strace.
>
> --
> raj shekhar
> facts: http://rajshekhar.net
> opinions: http://rajshekhar.net/blog
> I've never made anyone's life easier and you know it!
>


Re: Slow mysql connections

2008-08-13 Thread Ananda Kumar
Hi Raj,
In which path the trace file would be created.

regards
anandkl


On 8/13/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> In infinite wisdom "Krishna Chandra Prajapati" <[EMAIL PROTECTED]>
> spoke thus:
>
> > Hi all,
> >
> > Connecting to mysql server (Production) is taking 5 to 6 seconds.
> Production
> > has 16Gb ram. Previously it was using only 6GB ram. The details are as
> > follows. DNS looks fine.
>
> Is it that the database you are connecting to has too many tables or
> columns and the mysql client spends some time making the autocomplete
> list?  Try connecting with "-A" option.
>
> If that does not help, from your client box, do the following
> "
>strace  -o mysql.strace  -T   mysql -u root -h host -p
> "
> (disconnect immediately after getting a connection)
>
> This will record you all the syscalls mysql client has made along with the
> ime spent in each syscall (-T option) in the mysql.strace file (-o
> option).  Review that file to see which syscall takes the maximum amount
> of time.
>
> --
> raj shekhar
> facts: http://rajshekhar.net
> opinions: http://rajshekhar.net/blog
> I've never made anyone's life easier and you know it!
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>
>


Re: Slow mysql connections

2008-08-13 Thread rajlist
In infinite wisdom "Krishna Chandra Prajapati" <[EMAIL PROTECTED]> spoke thus:

> Hi all,
> 
> Connecting to mysql server (Production) is taking 5 to 6 seconds. Production
> has 16Gb ram. Previously it was using only 6GB ram. The details are as
> follows. DNS looks fine.

Is it that the database you are connecting to has too many tables or
columns and the mysql client spends some time making the autocomplete
list?  Try connecting with "-A" option.

If that does not help, from your client box, do the following
"
strace  -o mysql.strace  -T   mysql -u root -h host -p
"
(disconnect immediately after getting a connection)

This will record you all the syscalls mysql client has made along with the
ime spent in each syscall (-T option) in the mysql.strace file (-o
option).  Review that file to see which syscall takes the maximum amount
of time. 

-- 
raj shekhar
facts: http://rajshekhar.net
opinions: http://rajshekhar.net/blog
I've never made anyone's life easier and you know it!



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



Re: Unique Id generation

2008-08-13 Thread R . Nils

> Why would the auto_increment not work for you? The only case where you
> would have a problem is if the last record was deleted before mysql
> shutdown. If you are really concerned about this unique scenario,
> insert a dummy record before shutdown to guard against it and delete
> the dummy record after you start back up.
> 
Hmm, and what about a server crash?

> 
> On Tue, Aug 12, 2008 at 8:29 AM,  <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I try to generate a unique id for each row in a Mysql-InnoDB Table.
> Because of many deletes I  can't use an auto_increment column.
> > After a Mysql restart, the next value for an auto_increment-column  is
> max(auto_increment-column)+1, and I need a really unique id.
> >
> >
> > My first solution looks like this:
> > I use a second table with an auto-increment-column, and add an insert
> trigger to the first table.
> > The insert trigger adds a row in the second table and uses  the
> last_insert_id() to get the unique value.
> > The (last) row in the second table will never be deleted.
> > Does anybody confirm with this solution?
> >
> > ###
> > drop table unique_id_messages_1;
> > create table unique_id_messages_1 (id bigint not null unique, subject
> text);
> >
> > drop table id_sequences_1;
> > create table id_sequences_1 (id bigint not null primary key
> auto_increment);
> >
> > drop trigger trg_unique_id_messages_1;
> >
> > DELIMITER |
> >
> > create trigger trg_unique_id_messages_1 BEFORE INSERT ON
> unique_id_messages_1
> > FOR EACH ROW BEGIN
> >  insert into id_sequences_1 values ();
> >  set NEW.id = (select last_insert_id());
> > END;
> > |
> > DELIMITER ;
> >
> > insert into unique_id_messages_1 (subject) values ("x1");
> > insert into unique_id_messages_1 (subject) values ("x2");
> > insert into unique_id_messages_1 (subject) values ("x3");
> > insert into unique_id_messages_1 (subject) values ("x4");
> > select * from unique_id_messages_1;
> > ###
> >
> >
> > Thanks in advance
> >
> > Rudi
> >
> >
> >
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein:
> http://www.shortview.de/[EMAIL PROTECTED]
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:   
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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



Re: RE: Unique Id generation

2008-08-13 Thread R . Nils


> >I try to generate a unique id for each row in a Mysql-InnoDB Table.
> >Because of many deletes I  can't use an auto_increment column.
> >After a Mysql restart, the next value for an auto_increment-column  is
> >max(auto_increment-column)+1, and I need a really unique id.
> >
> [JS] See if the UUID() function will suit you.

unfortunately I forgot to note that I use statement-based replication, so I 
can't use the UUID() function.

> >
> >My first solution looks like this:
> >I use a second table with an auto-increment-column, and add an insert
> >trigger to the first table.
> >The insert trigger adds a row in the second table and uses  the
> >last_insert_id() to get the unique value.
> >The (last) row in the second table will never be deleted.
> >Does anybody confirm with this solution?
> >
> >###
> >drop table unique_id_messages_1;
> >create table unique_id_messages_1 (id bigint not null unique, subject
> >text);
> >
> >drop table id_sequences_1;
> >create table id_sequences_1 (id bigint not null primary key
> >auto_increment);
> >
> >drop trigger trg_unique_id_messages_1;
> >
> >DELIMITER |
> >
> >create trigger trg_unique_id_messages_1 BEFORE INSERT ON
> >unique_id_messages_1
> >FOR EACH ROW BEGIN
> >  insert into id_sequences_1 values ();
> >  set NEW.id = (select last_insert_id());
> >END;
> >|
> >DELIMITER ;
> >
> >insert into unique_id_messages_1 (subject) values ("x1");
> >insert into unique_id_messages_1 (subject) values ("x2");
> >insert into unique_id_messages_1 (subject) values ("x3");
> >insert into unique_id_messages_1 (subject) values ("x4");
> >select * from unique_id_messages_1;
> >###
> >
> >
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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



Re: Slow mysql connections

2008-08-13 Thread Xuekun Hu
You should run into out of memory scenaria. OS is keeping to free some
memory that delay mysql connection.

On 8/13/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 13, 2008 at 1:30 PM, Doug Bridgens <[EMAIL PROTECTED]> wrote:
>
> > Do you have any other services running on the server, such as mail or web?
> >   How long does it take to connect to those services ('telnet  25',
> > or telnet  80')?
>
>
> No
>
> >
> > What are you using to connect to mysql?   how long does 'telnet 
> > 3306' take (assuming you are on the default port and have firewall access)?
> >   How long does it take to connect from a local server session?
> >
>
> mysql client 5.0.19
>
> >
> > When you are doing the above tests, do them with the server name and with
> > the IP address.
>
>
> Tried with both
>
> The above should let you rule out your client, and any server related issues
> > such as DNS or firewall.   So you will know if it is a mysql problem or not.
> >
> > cheers,
> > Doug
> >
> >
> >
> > On 13 Aug 2008, at 05:39, Krishna Chandra Prajapati wrote:
> >
> >  Hi all,
> >>
> >> Connecting to mysql server (Production) is taking 5 to 6 seconds.
> >> Production
> >> has 16Gb ram. Previously it was using only 6GB ram. The details are as
> >> follows. DNS looks fine.
> >>
> >> free -m
> >>total   used   free sharedbuffers cached
> >> Mem: 15899  15877 21  0 97  13913
> >> -/+ buffers/cache:   1865  14033
> >> Swap:0  0  0
> >>
> >> ---
> >>
> >> vmstat
> >> procs ---memory-- ---swap-- -io -system--
> >> cpu
> >> r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
> >> wa
> >> 0  0  0  26792 100600 142428680089   15000  7  1
> >> 92  0
> >> 1
> >> -
> >>
> >> cat /proc/meminfo
> >> MemTotal: 16281204 kB
> >> MemFree: 26692 kB
> >> Buffers:100916 kB
> >> Cached:   14243248 kB
> >> SwapCached:  0 kB
> >> Active:8338968 kB
> >> Inactive:  7679900 kB
> >> HighTotal:   0 kB
> >> HighFree:0 kB
> >> LowTotal: 16281204 kB
> >> LowFree: 26692 kB
> >> SwapTotal:   0 kB
> >> SwapFree:0 kB
> >> Dirty: 224 kB
> >> Writeback:   0 kB
> >> AnonPages: 1674640 kB
> >> Mapped:  11616 kB
> >> Slab:   215140 kB
> >> PageTables:   4232 kB
> >> NFS_Unstable:0 kB
> >> Bounce:  0 kB
> >> CommitLimit:   8140600 kB
> >> Committed_AS:  2182136 kB
> >> VmallocTotal: 34359738367 kB
> >> VmallocUsed:   252 kB
> >> VmallocChunk: 34359738043 kB
> >>
> >>
> >> --
> >>
> >> ps aux  (The below process is only process using cpu and memory)
> >>
> >> mysql 3963 10.6 10.2 2190136 1671816 ? Sl   Mar28 21019:10
> >> /usr/sbin/mysqld --basedir=/usr --datadir=/v
> >>
> >> cpu usage 10.6
> >> memory usage 10.2
> >>
> >> Please tell how & what are the reasons and how can i solve this problem.
> >>
> >> Krishna Chandra Prajapati
> >> MySQL DBA,
> >>
> >
> >
> > --
> > 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]



Replication between debian and fedora box

2008-08-13 Thread Krishna Chandra Prajapati
Hi all,

Is it possible to create replication between debian and fedora box.

-- 
Krishna Chandra Prajapati


Re: Slow mysql connections

2008-08-13 Thread Krishna Chandra Prajapati
On Wed, Aug 13, 2008 at 1:30 PM, Doug Bridgens <[EMAIL PROTECTED]> wrote:

> Do you have any other services running on the server, such as mail or web?
>   How long does it take to connect to those services ('telnet  25',
> or telnet  80')?


No

>
> What are you using to connect to mysql?   how long does 'telnet 
> 3306' take (assuming you are on the default port and have firewall access)?
>   How long does it take to connect from a local server session?
>

mysql client 5.0.19

>
> When you are doing the above tests, do them with the server name and with
> the IP address.


Tried with both

The above should let you rule out your client, and any server related issues
> such as DNS or firewall.   So you will know if it is a mysql problem or not.
>
> cheers,
> Doug
>
>
>
> On 13 Aug 2008, at 05:39, Krishna Chandra Prajapati wrote:
>
>  Hi all,
>>
>> Connecting to mysql server (Production) is taking 5 to 6 seconds.
>> Production
>> has 16Gb ram. Previously it was using only 6GB ram. The details are as
>> follows. DNS looks fine.
>>
>> free -m
>>total   used   free sharedbuffers cached
>> Mem: 15899  15877 21  0 97  13913
>> -/+ buffers/cache:   1865  14033
>> Swap:0  0  0
>>
>> ---
>>
>> vmstat
>> procs ---memory-- ---swap-- -io -system--
>> cpu
>> r  b   swpd   free   buff  cache   si   sobibo   in   cs us sy id
>> wa
>> 0  0  0  26792 100600 142428680089   15000  7  1
>> 92  0
>> 1
>> -
>>
>> cat /proc/meminfo
>> MemTotal: 16281204 kB
>> MemFree: 26692 kB
>> Buffers:100916 kB
>> Cached:   14243248 kB
>> SwapCached:  0 kB
>> Active:8338968 kB
>> Inactive:  7679900 kB
>> HighTotal:   0 kB
>> HighFree:0 kB
>> LowTotal: 16281204 kB
>> LowFree: 26692 kB
>> SwapTotal:   0 kB
>> SwapFree:0 kB
>> Dirty: 224 kB
>> Writeback:   0 kB
>> AnonPages: 1674640 kB
>> Mapped:  11616 kB
>> Slab:   215140 kB
>> PageTables:   4232 kB
>> NFS_Unstable:0 kB
>> Bounce:  0 kB
>> CommitLimit:   8140600 kB
>> Committed_AS:  2182136 kB
>> VmallocTotal: 34359738367 kB
>> VmallocUsed:   252 kB
>> VmallocChunk: 34359738043 kB
>>
>>
>> --
>>
>> ps aux  (The below process is only process using cpu and memory)
>>
>> mysql 3963 10.6 10.2 2190136 1671816 ? Sl   Mar28 21019:10
>> /usr/sbin/mysqld --basedir=/usr --datadir=/v
>>
>> cpu usage 10.6
>> memory usage 10.2
>>
>> Please tell how & what are the reasons and how can i solve this problem.
>>
>> Krishna Chandra Prajapati
>> MySQL DBA,
>>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>


--


Re: Slow mysql connections

2008-08-13 Thread Doug Bridgens
Do you have any other services running on the server, such as mail or  
web?   How long does it take to connect to those services ('telnet  
 25', or telnet  80')?


What are you using to connect to mysql?   how long does 'telnet  
 3306' take (assuming you are on the default port and have  
firewall access)?   How long does it take to connect from a local  
server session?


When you are doing the above tests, do them with the server name and  
with the IP address.


The above should let you rule out your client, and any server related  
issues such as DNS or firewall.   So you will know if it is a mysql  
problem or not.


cheers,
Doug


On 13 Aug 2008, at 05:39, Krishna Chandra Prajapati wrote:


Hi all,

Connecting to mysql server (Production) is taking 5 to 6 seconds.  
Production

has 16Gb ram. Previously it was using only 6GB ram. The details are as
follows. DNS looks fine.

free -m
total   used   free sharedbuffers  
cached
Mem: 15899  15877 21  0 97   
13913

-/+ buffers/cache:   1865  14033
Swap:0  0  0

---

vmstat
procs ---memory-- ---swap-- -io -system--
cpu
r  b   swpd   free   buff  cache   si   sobibo   in   cs us  
sy id

wa
0  0  0  26792 100600 142428680089   15000   
7  1

92  0
1
-

cat /proc/meminfo
MemTotal: 16281204 kB
MemFree: 26692 kB
Buffers:100916 kB
Cached:   14243248 kB
SwapCached:  0 kB
Active:8338968 kB
Inactive:  7679900 kB
HighTotal:   0 kB
HighFree:0 kB
LowTotal: 16281204 kB
LowFree: 26692 kB
SwapTotal:   0 kB
SwapFree:0 kB
Dirty: 224 kB
Writeback:   0 kB
AnonPages: 1674640 kB
Mapped:  11616 kB
Slab:   215140 kB
PageTables:   4232 kB
NFS_Unstable:0 kB
Bounce:  0 kB
CommitLimit:   8140600 kB
Committed_AS:  2182136 kB
VmallocTotal: 34359738367 kB
VmallocUsed:   252 kB
VmallocChunk: 34359738043 kB


--

ps aux  (The below process is only process using cpu and memory)

mysql 3963 10.6 10.2 2190136 1671816 ? Sl   Mar28 21019:10
/usr/sbin/mysqld --basedir=/usr --datadir=/v

cpu usage 10.6
memory usage 10.2

Please tell how & what are the reasons and how can i solve this  
problem.


Krishna Chandra Prajapati
MySQL DBA,



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