Database Performance Tweaking

2006-06-07 Thread Cx Cx
Hi All, Hope this is the right list to post to, excuse if it is not ;-) Server scenario: Dedicated server running MySQL 4 and secondary process inserting data into MySQL How does one calculate what the values should be for the following areas in the my.cfg file to give optimal performance:

Re: Sad, I know...

2006-06-07 Thread John Meyer
tomáz rezistänz wrote: I wish I could uninstall mySQL and start over but I don't know how.. On 6/7/06, tomáz rezistänz [EMAIL PROTECTED] wrote: Do you know how to dump your mySQL databases? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: DateTime limits

2006-06-07 Thread Ben Clewett
Thanks for the information. I agree with what you say. There is just one comment I'd like to make. You are right that the TIMESTAMP has a specific range. I am comparing it to a date outside that range. This could cause problems. But I strongly believe that the SQL user, who in many cases

RE: Sad, I know...

2006-06-07 Thread J.R. Bullington
So, by using MacOS X, you are using a *nix based system. Everything posted to this list is usually based in code (as in WebApps) or by the MySQL command line. You need to learn how to use the command line (terminal.app) and SQL. There are lots of books out there, including on using and installing

Re: Query performance.

2006-06-07 Thread Eugene Kosov
Thanks a lot!! :D You were right. There was a bug. Upgrading to mysql 4.1.20 solved my problem. Daniel da Veiga wrote: Check http://bugs.mysql.com/bug.php?id=12915 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Sad, I know...

2006-06-07 Thread tomáz rezistänz
OK, thanks for the guidance. I will try once more to make sense of the mySQL documentation. I thought I was going in the right direction when I clicked on setup script (below) and went to the security panel, but then I wasn't sure what to enter as far as blowfish question, socket, folder, etc,

Re: Sad, I know...

2006-06-07 Thread Daniel da Veiga
On 6/7/06, tomáz rezistänz [EMAIL PROTECTED] wrote: OK, thanks for the guidance. I will try once more to make sense of the mySQL documentation. I thought I was going in the right direction when I clicked on setup script (below) and went to the security panel, but then I wasn't sure what to

Selecting Common Data

2006-06-07 Thread John Nichel
Running MySQL 4.0.20 on a RHEL3 box. Hi, I'm trying to find the data in a table which is common to two or more ids. Let's say my table looks like this... --- | col1 | col2 | --- | a | 1 | | a | 2 | | a | 3 | | b | 4 | | b | 2 | | b

MySQL Server

2006-06-07 Thread Kaushal Shriyan
Hi ALL I have RHL 9.0 installed on my box, and I have installed mysql-3.23.54a-11.i386.rpm mysql-server-3.23.54a-11.i386.rpm, due to some reason i deleted the folders from /var/lib/mysql, I mean mysql and test folder located under /var/lib/mysql I have re-installed the package mysql and

ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Mark Sargent
Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same), and to change column |b| from |CHAR(10)| to |CHAR(20)| as

RE: MySQL Server

2006-06-07 Thread Jimmy Guerrero
Hello, Is there a particular reason you need to be working with version 3.23 (besides it being part of the RHL distro?) You might want to start with version 5.0 or 4.1. http://dev.mysql.com/downloads/ Thanks, Jimmy Guerrero Sr Product Manager MySQL, Inc -Original Message- From:

Re: Sad, I know...

2006-06-07 Thread tomáz rezistänz
I understans, but within phpmyadmin I was given the option to add passwords to 4 different accounts, including root. That's where I locked myself out, so that's where I tried getting back in.. On 6/7/06, Daniel da Veiga [EMAIL PROTECTED] wrote: On 6/7/06, tomáz rezistänz [EMAIL PROTECTED]

Re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Chris Sansom
At 0:09 +1000 8/6/06, Mark Sargent wrote: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I'm no great expert myself, but off the top of my head,

re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Rob Desbois
Mark, With the CHANGE clause of ALTER TABLE statement, you must provide the column definition, so something like this is what you need: ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL; or whatever your original definition is. AFAIK there is no way to rename a column

RE: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread J.R. Bullington
You can't just change the name without changing (or stating) the type. ALTER TABLE actors CHANGE director_id actos_id varchar(96) default NULL; J.R. -Original Message- From: Mark Sargent [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 10:10 AM To: mysql@lists.mysql.com

re: ERROR 1064 (42000): You have an error in your SQL syntax;

2006-06-07 Thread Chris Sansom
At 15:19 +0100 7/6/06, Rob Desbois wrote: With the CHANGE clause of ALTER TABLE statement, you must provide the column definition, so something like this is what you need: ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL; or whatever your original definition is.

RE: Sad, I know...

2006-06-07 Thread J.R. Bullington
You really should learn some of the command line items before delving into the GUIs. MySQL has the Administrator and Query Browser for MacOS X. If you need to start with any GUI, these are probably the ones you should start with. It's a nice blend of command line and GUI tools. J.R.

Re: Selecting Common Data

2006-06-07 Thread Adrian Bruce
John I think you are saying you want the Mode? if you are then the following might work: SELECT col2 as val, count(col2) AS cc FROM my_table GROUP BY val ORDER BY cc DESC LIMIT 1; in your case this will retrun the value '2' Regards Ade John Nichel wrote: Running MySQL 4.0.20 on a RHEL3

Re: Selecting Common Data

2006-06-07 Thread John Nichel
Adrian Bruce wrote: John I think you are saying you want the Mode? if you are then the following might work: SELECT col2 as val, count(col2) AS cc FROM my_table GROUP BY val ORDER BY cc DESC LIMIT 1; in your case this will retrun the value '2' Regards Ade Thanks for the reply Ade.

Re: Selecting Common Data

2006-06-07 Thread Dan Buettner
Here's one way: create table tbl ( col1 char(1), col2 int ); insert into tbl (col1, col2) VALUES (a,1), (a,2), (a,3), (b,4), (b,2), (b,7), (c,1), (c,2); select col2 from tbl group by col2 having count(col2) = 2 order by col2; +--+ | col2 | +--+ |1 | |2 | +--+ 2 rows in

Re: Sad, I know...

2006-06-07 Thread tomáz rezistänz
OK, thanks. Will do my research. On 6/7/06, J.R. Bullington [EMAIL PROTECTED] wrote: You really should learn some of the command line items before delving into the GUIs. MySQL has the Administrator and Query Browser for MacOS X. If you need to start with any GUI, these are probably the ones

Re: Selecting Common Data

2006-06-07 Thread John Nichel
Dan Buettner wrote: Here's one way: create table tbl ( col1 char(1), col2 int ); insert into tbl (col1, col2) VALUES (a,1), (a,2), (a,3), (b,4), (b,2), (b,7), (c,1), (c,2); select col2 from tbl group by col2 having count(col2) = 2 order by col2; +--+ | col2 | +--+ |1 | |2 |

MySQL

2006-06-07 Thread Kaushal Shriyan
Hi ALL [EMAIL PROTECTED] mysql]# mysql -u root -h saabworld.com -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 20 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use mysql; Can't read dir

Re: MySQL

2006-06-07 Thread Duncan Hill
On Wednesday 07 June 2006 16:04, Kaushal Shriyan wrote: mysql use mysql; Can't read dir of './mysql/' (Errcode: 13) Database changed mysql show tables; ERROR 12: Can't read dir of './mysql/' (Errcode: 13) mysql Kaushal $ perror 13 OS error code 13: Permission denied Your file system

Re: MySQL

2006-06-07 Thread Jørn Dahl-Stamnes
On Wednesday 07 June 2006 17:04, Kaushal Shriyan wrote: Hi ALL [EMAIL PROTECTED] mysql]# mysql -u root -h saabworld.com -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 20 to server version: 3.23.54 Type 'help;' or '\h' for help. Type

Self join group by issue...

2006-06-07 Thread Dan
I have a PHP driven site where I have a internal messaging type system for registered users. Each time a message is sent I create a log entry in a table with the from and to user id and an id from the original message to maintain a message 'thread'. Example (my timestamps do not display

building index table, duplicate .MYD

2006-06-07 Thread Gaspar Bakos
Hi, I wonder if anyone could explain the rational behind the following: (MySQL-5.0.22) We have a MyISam table with ~100Gb size. We start creating an index. The procedure starts making temporary files: -rw-rw 1 mysql mysql11430 Jun 7 10:27 #sql-79d6_cc.frm -rw-rw 1 mysql mysql

Transfer users and permissions between servers

2006-06-07 Thread ddevaudreuil
Is there an easy way to transfer users and their permissions from one server to another? We are moving databases to a new server and have a lot of users to move as well. Thanks in advance! Donna

Joins - Multiple rows from a single table

2006-06-07 Thread Geoffrey Sneddon
I've got the following query: SELECT `bugs`.`id`, `bugs`.`assignee`, `users`.`username`, `bugs`.`submitter` FROM `fb_bugs` AS `bugs`, `fb_users` AS `users` WHERE `users`.`id` = `bugs`.`assignee` My problem is that I also want the `users`.`username` for `bugs`.`submitter`. How can I do

MYSQL-on cascade no action

2006-06-07 Thread Nenad Bosanac
Hi all I have problem in MYSQL query tool. Well i put on foreign key on cascade no action but next time when i edit that table it said that is on cascade is restrict. Why is that ? I use MYSQL Query tool and my database is INNODB. Is there some kind of way to make it work or it is some kind of

Re: Transfer users and permissions between servers

2006-06-07 Thread Keith Roberts
Are you moving to a new unpopulated server, or are there already mysql users on the new server? If it is a new server with no other mysql users onboard, then I guess it is as easy as copying the mysql system database (/var/lib/mysql/mysql on my system) across to the new server, with the other

Re: MYSQL-on cascade no action

2006-06-07 Thread Jo�o C�ndido de Souza Neto
I´ve never seen on cascade no action, you want to say on delete cascade or something like this? Nenad Bosanac [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi all I have problem in MYSQL query tool. Well i put on foreign key on cascade no action but next time when i edit

Re: Joins - Multiple rows from a single table

2006-06-07 Thread Peter Brawley
Geoffrey, SELECT bugs.id, bugs.assignee, users.username, bugs.submitter FROM fb_bugs AS bugs, fb_users AS users WHERE users.id = bugs.assignee My problem is that I also want the users.username for bugs.submitter. How can I do that? Join users a second time for bugs.submitter, eg ...

Re: Joins - Multiple rows from a single table

2006-06-07 Thread Geoffrey Sneddon
On 7 Jun 2006, at 18:56, Peter Brawley wrote: Join users a second time for bugs.submitter, eg ... SELECT bugs.id, bugs.title, UNIX_TIMESTAMP(bugs.submitted), bugs.fix, bugs.assignee, users.username, users2.username AS Submitter, bugs.category, category.name, bugs.version,

Re: Database Performance Tweaking

2006-06-07 Thread Dan Buettner
Craig, this is the right place, but performance is a pretty broad topic. I personally highly recommend Jeremy Zawodny's book, 'High Performance MySQL'. It's based on 4.1, so the info will be well suited to your install (I don't know if it will be updated for 5 ... anyone?). You can also

mysqldump locks dumping db mysql in 5.1.9

2006-06-07 Thread James Barros
Hello, I've got 5.1.9 running on FreeBSD and I'm trying to do some backups, but mysqldump is locking up on me. when I run: mysqldump -uroot --opt mysql (and yes, it's a test box, so there is no root password. I can duplicate this behavior with other accounts with sufficient priv's

ERROR 1045 (28000): Access denied for user (Using password: YES) from outside localhost

2006-06-07 Thread Aron Levy
Hi good afternoon, i am triying to connect with my company's mysql server using a client program from shell and I keep receiving the following answer: [EMAIL PROTECTED] ~]# mysql -u user1 -p -h serverCompany.com Enter password: ERROR 1045 (28000): Access denied for user 'user1'@'200.93.42.209'

functions in AS

2006-06-07 Thread Jay Blanchard
select psDealerID, sum(if(substring(updated, 1, 10) = curdate(), 1, 0)), sum(if(substring(updated, 1, 10) = date_sub(curdate(), interval 1 day), 1, 0)) from provision group by psDealerID I love crosstab queries, but one thing really eats at me. I'd like to be able to add significance to the

Re: ERROR 1045 (28000): Access denied for user (Using password: YES) from outside localhost

2006-06-07 Thread James Barros
Well, for starters don't worry about ports being open. If you werent able to connect, it would give you a different error message. select password('yourpassword'); and verify that the hash produced matches the password field in user exactly. -- James On Jun 7, 2006, at 11:48 AM, Aron

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

Re: functions in AS

2006-06-07 Thread Peter Brawley
Jay, We all know that you cannot do something like this; sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() nor can you use user variables even though they get set properly set @d1 = curdate(); sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 So, does anyone know of a

Re: ERROR 1045 (28000): Access denied for user (Using password: YES) from outside localhost

2006-06-07 Thread Aron Levy
Hi James i follow your recomendation and verify that the hash produced matches the password field in user exactly. -- Aron L. James Barros wrote: Well, for starters don't worry about ports being open. If you werent able to connect, it would give you a different error message. select

Re: ERROR 1045 (28000): Access denied for user (Using password: YES) from outside localhost

2006-06-07 Thread Daniel da Veiga
On 6/7/06, Aron Levy [EMAIL PROTECTED] wrote: Hi James i follow your recomendation and verify that the hash produced matches the password field in user exactly. -- Aron L. Well, that's weird, should be working. A shot in the dark: try starting your server with --old-passwords as an option

Re: ERROR 1045 (28000): Access denied for user (Using password: YES) from outside localhost

2006-06-07 Thread James Barros
Can this use log in from localhost successfully? Try flushing privileges again? If that failed, I'd drop the user and recreate? ( Theres really not alot to this, sorry I don't have any more ideas :( ) -- James On Jun 7, 2006, at 1:07 PM, Aron Levy wrote: Hi James i follow your recomendation

Table size, db size and hence disk space.

2006-06-07 Thread Vidya Biju
I am new to databases and mysql in particular. I need to provide the specifications for database size for a new design... Lets assume one of my tables has the following structure column1 int column2 int column3 varchar(200) column4 char(1) column5 int column6 text column7 datetime

RE: functions in AS

2006-06-07 Thread Jay Blanchard
[snip] We all know that you cannot do something like this; sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() nor can you use user variables even though they get set properly set @d1 = curdate(); sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 So, does anyone know of a

Windows Compiled Help MySQL Reference Manual -- Error

2006-06-07 Thread Jake Peavy
Hey yall, I'm unable to open the .chm I just downloaded for 5.1. I get the following error: Cannot open the file: mk:@MSITStore:C:\Documents and Settings\jpeavy1\My Documents\refman-5.1-en.chm. Any ideas? TIA -- -jp One time in an airport a guy accidently called Chuck Norris Chick

Re: Windows Compiled Help MySQL Reference Manual -- Error

2006-06-07 Thread Paul DuBois
At 17:30 -0600 6/7/06, Jake Peavy wrote: Hey yall, I'm unable to open the .chm I just downloaded for 5.1. I get the following error: Cannot open the file: mk:@MSITStore:C:\Documents and Settings\jpeavy1\My Documents\refman-5.1-en.chm. Any ideas? It does seem to be corrupt. We'll take a

MySQL (GPL License)

2006-06-07 Thread Michael Louie Loria
Hello, I would like to inquire about the GPL License used by MySQL. Here's our scenario We developed our owned software needed by our operations using MySQL community edition under Windows platform. GPL says that we should distribute/share the source code. But I think it isn't even of interest

How to find matching tables that have specific field name.

2006-06-07 Thread William Scott
Dear Sir, I have a database with over 80 tables. Is there an easy way to find table names that has PERSON_ID field using SELECT query? Thanks in advance for any help. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has

RE: MySQL (GPL License)

2006-06-07 Thread Logan, David (SST - Adelaide)
Hi Michael, I believe you can purchase a commercial license taking away the GPL provisions from your software if you do not wish to GPL your own software. You can enquire on the MySQL website. Regards --- ** _/ **

Re: How to find matching tables that have specific field name.

2006-06-07 Thread Douglas Sims
Hello William If you are using MySQL version 5.0 and up, you can select from the TABLE table in the INFORMATION_SCHEMA database. This database contains information about all of the structures in the MySQL server. For example, if you are looking for all of the tables in a database called

Re: mysqldump locks dumping db mysql in 5.1.9

2006-06-07 Thread Greg 'groggy' Lehey
On Wednesday, 7 June 2006 at 11:35:56 -0700, James Barros wrote: Hello, I've got 5.1.9 running on FreeBSD and I'm trying to do some backups, but mysqldump is locking up on me. when I run: mysqldump -uroot --opt mysql (and yes, it's a test box, so there is no root password. I can

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

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
I believe that if you are only using MySQL for your company's internal needs, whether from a web server or for deployment to other company-owned locations, you don't need a commercial license. For example, if your company owns fifiteen stores, you could set up a MySQL-based point-of-sale

Re: Copying tables sans data from one database to another

2006-06-07 Thread Douglas Sims
Perhaps the easiest way is with CREATE TABLE... SELECT. For example, if I have a database called NYCNH (by coincidence, I do!) which contains a table called checks and I want to copy that table to a database called TEST I could do this: mysql create table test.checks select * from

MySQL crashes

2006-06-07 Thread Ian Collins
I have a site running MySQL 4.1.19. When I was first given the problem, the site only stayed up for a couple of days - they then found they had to reboot (as opposed to just restarting MySQL). The error message they were getting is below (between the snip's). After looking at the site, I

Re: MySQL (GPL License)

2006-06-07 Thread Michael Louie Loria
Ok thanks, I'm somehow clarified. Mic Douglas Sims wrote: I believe that if you are only using MySQL for your company's internal needs, whether from a web server or for deployment to other company-owned locations, you don't need a commercial license. For example, if your company owns

RE: MySQL (GPL License)

2006-06-07 Thread Daevid Vincent
However, it is very reasonable and desirable to support MySQL as a company, as they save us all tons of money over Oracle, MS-SQL, etc., in addition to providing an excellent product. So even if you don't need the commercial license, if your company depends upon MySQL, buying a

Re: How to find matching tables that have specific field name.

2006-06-07 Thread Frank
William Scott wrote: Dear Sir, I have a database with over 80 tables. Is there an easy way to find table names that has PERSON_ID field using SELECT query? Thanks in advance for any help. Hi Scott, if you are using version 5.0 or higher, you can query the schema

RE: MySQL (GPL License)

2006-06-07 Thread Jimmy Guerrero
Hello, If you are still unsure about the licensing, this may help... http://www.mysql.com/company/legal/licensing/ http://www.mysql.com/company/legal/licensing/faq.html There are also related links off to the right concerning the Open Source License and Commercial License. Thanks, Jimmy

Re: MySQL crashes

2006-06-07 Thread Daniel da Veiga
On 6/7/06, Ian Collins [EMAIL PROTECTED] wrote: I have a site running MySQL 4.1.19. When I was first given the problem, the site only stayed up for a couple of days - they then found they had to reboot (as opposed to just restarting MySQL). The error message they were getting is below (between

Re: functions in AS

2006-06-07 Thread Peter Brawley
Jay, [snip] We all know that you cannot do something like this; sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS curdate() nor can you use user variables even though they get set properly set @d1 = curdate(); sum(if(substring(updated, 1, 10) = curdate(), 1, 0)) AS @d1 So,

Re: MySQL crashes

2006-06-07 Thread Dilipkumar
Hi, This might be a bug try to create mysql stack trace file and find out what is causing for mysql crash, this might be a query hitting mysql and also memory related issues.Try to upgrade your mysql and report back. Daniel da Veiga wrote: On 6/7/06, Ian Collins [EMAIL PROTECTED] wrote:

Re: MySQL (GPL License)

2006-06-07 Thread mos
At 08:15 PM 6/7/2006, you wrote: I believe that if you are only using MySQL for your company's internal needs, whether from a web server or for deployment to other company-owned locations, you don't need a commercial license. For example, if your company owns fifiteen stores, you could set up a

Re: Copying tables sans data from one database to another

2006-06-07 Thread Dilipkumar
Hi, It is Rename table name to database.tablename. db-1 db-2 rename db1.tablename to db2.tablename. This might help you out. murthy gandikota wrote: How can I copy tables from one database to another on the same host? Thanks for your help Murthy

Re: Windows Compiled Help MySQL Reference Manual -- Error

2006-06-07 Thread Jake Peavy
On 6/7/06, Paul DuBois [EMAIL PROTECTED] wrote: At 17:30 -0600 6/7/06, Jake Peavy wrote: Hey yall, I'm unable to open the .chm I just downloaded for 5.1. I get the following error: Cannot open the file: mk:@MSITStore:C:\Documents and Settings\jpeavy1\My Documents\refman-5.1-en.chm. Any

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
Ouch. Thanks for the clarification. Two additional thoughts: 1) Does this apply (I think not) even if you don't compile with or link with the MySQL database? If you just connect to it with ports or sockets, as we usually do with web applications, you still don't need a commercial

Re: MySQL (GPL License)

2006-06-07 Thread Douglas Sims
Oh, one other thing. The group that I work with at the one large company (call it company X) which Randy the MS rep was taking to lunch... is about to upgrade some servers and spend somewhere around $250k on new MS SQL server licenses. I'm not really sure why. (Oxygen deprivation could

OR isn't optimised

2006-06-07 Thread Taras D
Hi everyone, I have the following schema: create table l ( aId int unsigned not null auto_increment primary key, sId smallint unsigned not null, dId smallint unsigned, index(sId,dId) ); create table d ( sId smallint unsigned not null, dId smallint unsigned not null, primary key(sId,