Re: mysql 4.1.5 source
Aman Raheja wrote: Latest realease is 4.1.7 in 4.1.x but I am looking for 4.1.5 source download. Pointers will be helpful. Thanks Aman http://downloads.mysql.com/archives.php?p=mysql-4.1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: debug
On 06/30/2004 02:46 PM Andrew Pattison spoke: The way I do this is within PHP is to echo the value stored in mysql_error after each SQL statement. If you're not using PHP then this probably doesn't help though ;-) I'm not using PHP. I'm loading tons of data with SQL statements from the command line. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [PHP-DB] mysql limit
Moved from a PHP list to a MySQL list. :-) On 06/30/2004 09:55 PM John W. Holmes spoke: Bob Lockie wrote: If I select rows with a limit clause I need to know if there are more rows than the limit. Either do a SELECT COUNT(*) prior to your LIMIT query to see how many total rows there are, or use SQL_CALC_FOUND_ROWS and FOUND_ROWS() (more info here: http://dev.mysql.com/doc/mysql/en/Information_functions.html) Is found_rows standard SQL? I want to easily portable code. Maybe I should use a select count first. :-) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Installing innoDB
On 07/01/2004 11:48 PM [EMAIL PROTECTED] spoke: I have MySQL 3.23 installed, which comes with RedHat ES3. I find that innoDB is not enabled. Anybody knows can I enable it? Thanks, Joseph Recompile the binary or upgrade to one that includes it. I don't think there is a runtime switch. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
debug
I'm running a ton of sql statements to load data. Is there a way to not display successes: Query OK, 1 row affected (0.02 sec) Records: 1 Duplicates: 0 Warnings: 0 and display failures and the query statement that failed? There are 60 000+ of these and I'd ideally like to debug the inserts without actually doing them. It fails on duplicate keys but I have no idea where the data is flawed. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
opposite query
I have: select name from a, b where a.type='X' and a.id=b.id; I want a query to return all the rows that were NOT found by the above query. I can't simply do: select name from a, b where a.type!='X' and a.id=b.id; because there is more than one row in b for each type!='X' but there is only one row in b for each type='X' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: opposite query
On 06/21/2004 04:26 PM [EMAIL PROTECTED] spoke: I don't understand. You want every other record except .what? By flipping the equality the way you did, you should see all of the records where a.id = b.id (regardless of what the b.type value is) where a.type was not 'X' which is one reasonably valid solution to the statement all of the rows NOT found by the above query The more details you give us the better we can help you. If you can give us your SHOW CREATE TABLE statements and possibly some sample data, we should be able to get at exactly the data you want to see. Respectfully, Shawn Green Database Administrator Unimin Corporation - Spruce Pine drop table a; create table a ( id int auto_increment, name varchar(20), primary key (id) ); drop table b; create table b ( id int auto_increment, a_id int not null, name char(20), type char, primary key (id) ); insert into a (name) values (row1); insert into b (a_id, name, type) values(1, 1b, X); insert into b (a_id, name, type) values(1, 2b, Y); insert into b (a_id, name, type) values(1, 3b, Y); insert into b (a_id, name, type) values(1, 4b, Z); insert into a (name) values (row2); insert into b (a_id, name, type) values(2, 1a, X); insert into b (a_id, name, type) values(2, 2a, Y); insert into b (a_id, name, type) values(2, 3a, Y); insert into b (a_id, name, type) values(2, 4a, Z); insert into a (name) values (row3); insert into b (a_id, name, type) values(3, 2a, Y); insert into b (a_id, name, type) values(3, 3a, Y); insert into b (a_id, name, type) values(3, 4a, Z); select a.name from a, b where b.type='X' and a.id=b.a_id; returns row1 and row1 from a. Now I need a select that will return row3 but not rows 1 or 2. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: opposite query
On 06/21/2004 05:02 PM Brent Baisley spoke: The opposite of the query would be a.type!='X' and there is no related record in table b. Not sure if that is what you what It isn't what I want because there could be other a.type other than 'X'. Oops, that should be b.type I need to return the a records that have no b records of type 'X' but there may be b records of other types. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Erro on Query
Luiz Rafael Culik Guimaraes wrote: Dear Friends. when Creating the follow table I got an Erro when defining Column DESC(same error even if DESC is between ) DESC is a reserved word, try something else. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
string compare
Where is the syntax error in this? select name from users where name like '%' and strcmp( substr(name from 1 for 3), 'abc' )=0; Why should I use strcmp since MySQL automatically converts numbers to strings as necessary, and vice versa.? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
update SQL
Rows matched=1 but rows changed=0. :-( What is wrong with my query? mysql update records, audit_log, audit_log_records - set records.name=audit_log_records.name, - records.type=audit_log_records.type, - records.content=audit_log_records.content, - records.ttl=audit_log_records.ttl, - records.prio=audit_log_records.prio - where audit_log.tracker_id=audit_log_records.tracker_id - and records.id=audit_log_records.id - and audit_log.operation='C' - and audit_log.completed is null; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: update SQL
On 06/04/04 11:28 Bob Lockie spoke: Rows matched=1 but rows changed=0. :-( What is wrong with my query? mysql update records, audit_log, audit_log_records - set records.name=audit_log_records.name, - records.type=audit_log_records.type, - records.content=audit_log_records.content, - records.ttl=audit_log_records.ttl, - records.prio=audit_log_records.prio - where audit_log.tracker_id=audit_log_records.tracker_id - and records.id=audit_log_records.id - and audit_log.operation='C' - and audit_log.completed is null; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 Sometimes it works, sometimes not. :-( -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SQL help
What I really want was mysql update records set records.prio=2 where records.in=(select records.id from records, audit_log, audit_log_records where audit_log.tracker_id=audit_log_records.tracker_id and records.id=audit_log_records.id and audit_log.operation='D' and audit_log.completed is null); but that gives a syntax error and I don't think I can do a select inside an update. :-( mysql update records set records.prio=2 where audit_log.tracker_id=audit_log_records.tracker_id and records.id=audit_log_records.id and audit_log.operation='D' and audit_log.completed is null; ERROR 1109: Unknown table 'audit_log' in where clause -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
rework this
I need help with this SQL. I want to delete all records from the 'audit_log_records' table that have 'tracker_id' columns that are the same as those from the audit_log table that have 'A' for the operation type. delete from audit_log_records where tracker_id=(select tracker_id from audit_log where audit_log.operation='A'); -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: rework this
On 05/31/04 15:42 Donny Simonton spoke: It depends on which version of MySQL you are using. Since you are using a subquery, I assume you are using a fairly new version. Delete audit_log_records from audit_log_records, audit_log where audit_log_records.tracker_id = audit_log.tracker_id and audit_log.operation='A' That should be it. It's called a multi-table delete, but you are only deleting from one table. You can't use left join or inner join with a multi-table delete or update. You have to do a comma join. Donny Great, thanks. I have MySQL-4.0.18 and that worked. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
syntax error
I want to do something like this: delete from records where records.id in (select audit_log_records.id from audit_log_records, audit_log where audit_log.tracker_id=audit_log_records.tracker_id and audit_log.operation='D'); -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help with update
On 05/21/04 20:40 Laercio Xisto Braga Cavalcanti spoke: Hi all, I'm using mysql 3.23.54 under RedHat9 trying to update a field named pac_fone in a table named paciente with the value of a field named ita_fone from a table named italica as follows: Try more quotes and get the select to work: select ita_fone fromitalica i, paciente p where i.ita_matricula = p.pac_matricula and i.ita_dv= p.pac_dv; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
start warning
I am posting this on behalf of a Gentoo user. Does anyone know why this warning happens? # /etc/init.d/mysql start * Could not get dependency info for mysql! * Could not get dependency info for mysql! * Starting mysqld... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
remote database
I am trying to remotely connect to a MySQL database but I'm having problems so I tried this on the same machine as the database. It doesn't work when I give it -h but it works without. # mysql -h 10.0.0.5 -D visitor ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) but # mysql -D visitor works. -- Sent from Mozilla and GNU/Linux. Powered by an AMD processor. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: remote database
On Wednesday, January 22, 2003, at 01:07 PM, Bob Lockie wrote: I am trying to remotely connect to a MySQL database but I'm having problems so I tried this on the same machine as the database. Thanks, to all who replied. I have it working. -- Sent from Mozilla and GNU/Linux. Powered by an AMD processor. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help create new user
Jeremy Zawodny wrote: On Mon, Nov 04, 2002 at 12:54:17AM -0500, Bob Lockie wrote: That fixed it, thanks. What did it use since I didn't specify an @'localhost'? It used '%' which matches everyhing *except* localhost. The manual explains this. Jeremy It's not obvious in the MySQL manual. I did a search. -- From Mozilla and GNU/Linux - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
help create new user
Does anyone know why? create database visitor; grant all on visitor.* to visitor_user identified by 'visitor'; use visitor; mysql -u visitor_user -p I get ERROR 1045: Access denied for user: 'visitor_user@localhost' (Using password: YES) From Mozilla and GNU/Linux - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: help create new user
Jeremy Zawodny wrote: On Mon, Nov 04, 2002 at 12:37:12AM -0500, Bob Lockie wrote: Does anyone know why? create database visitor; grant all on visitor.* to visitor_user identified by 'visitor'; use visitor; mysql -u visitor_user -p I get ERROR 1045: Access denied for user: 'visitor_user@localhost' (Using password: YES) Try: grant all on visitor.* to visitor_user@'localhost' identified by 'visitor'; Jeremy That fixed it, thanks. What did it use since I didn't specify an @'localhost'? -- From Mozilla and GNU/Linux - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
error running
I haven't used mysql yet. How do I fix this error when starting it? #/d2/usr2/local/mysql-3.23.51/bin/safe_mysqld Starting mysqld daemon with databases from /d2/mysql_db 020730 21:36:23 mysqld ended # more /d2/mysql_db/host.err 020730 21:36:23 mysqld started 020730 21:36:23 /d2/usr2/local/mysql-3.23.51/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 020730 21:36:23 mysqld ended My datadir is NOT relative to my INSTALLATIONDIR. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: error running
check for ur permissions and ownership on that file. The ownership on the directory but the ownership on the files was incorrect. The script fooled me into assuming everything under the directory was correct since the directory was. - Original Message - From: Bob Lockie [EMAIL PROTECTED] To: mysql mailing list [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 7:49 PM Subject: error running I haven't used mysql yet. How do I fix this error when starting it? #/d2/usr2/local/mysql-3.23.51/bin/safe_mysqld Starting mysqld daemon with databases from /d2/mysql_db 020730 21:36:23 mysqld ended # more /d2/mysql_db/host.err 020730 21:36:23 mysqld started 020730 21:36:23 /d2/usr2/local/mysql-3.23.51/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 020730 21:36:23 mysqld ended My datadir is NOT relative to my INSTALLATIONDIR. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
running the server problem
./safe_mysqld --user=mysqld --datadir=/db/ ./safe_mysqld --user=mysqld --datadir=/db/ 020401 16:55:04 mysqld started 020401 16:55:04 /d2/usr2/local/mysql/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 020401 16:55:04 mysqld ended My unix user is called mysqld and I want databases to go in /db/. Does anybody know what it is trying to do? I put in a non-standard location (/d2/usr2/local/) and I used a non-standard user (mysqld). I have no scripts nor var directories as the documentation says I should. scripts/mysql_install_db. I have version 3.23.49 of the source. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php