Re: source compilatio or install precompiled packages
Hi Jose, there are only a few reasons why you should NOT use a pre-compiled package: 1. The version of MySQL you want to use (e.g. Alpha-Version) does not exist for your machine 2. You want to use features not available in the pre-compiled version. On the other hand there are some very good reasons to use pre-compiled packages 1. They are crafted by MySQL AB who exactly know how to build and configure a stable and reliable package of MySQL 2. MySQL AB uses advanced commercial compilers for assembling the package which are usually faster than opensource compilers 3. MySQL AB uses advanced libraries compiled into the distributions other than the ones your OS might use when compiling 4. In my Opinion it is easier to upgrade a pre-compiled package via your operating systems upgrade system (e.g. FreeBSD Portmanager) Greets Rocco -- New Identity AG http://www.newidentity.de On 10/24/06, Jose Manuel Peso [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi list, Why is recommended the precompiled package install way (as i read in the downloads page)? Thanks, Jose -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFPm13a75uizYnLswRAm+eAJ495WwhxXxlZXimyatDv9zbHSSs0gCgnbcv wZGKrlT07egY1zK04Zyq8W0= =72XY -END PGP SIGNATURE- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: Trying to run two mysql instances on one server
Hello Low Kian, first, you cannot attach files to this mailing list, however from the error, i assume that you have not specified different socks and ports for each MySQL instance. You need to put that information into your configuration file for each server , e.g.: #server 1 option file port=3306 socket=/tmp/mysql.sock #server 2 option file port=3406 socket=/tmp/mysql2.sock Greets Rocco On 10/13/06, Low Kian Seong [EMAIL PROTECTED] wrote: Dear all, I am trying to run two mysql instances on one server using the mysqld_multi command. Attached is my configuration file. The data directory is at /var/lib/mysql and /var/lib/mysql2. When i try to run mysqld_multi start 2,3 it won't start up and the error i get is that something else is already running at mysql.sock socket. I have already shut down all instances of mysql servers. I am trying to get this setup working on my opensuse 10.1 box. Can someone please tell me what is wrong ? Thank you in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: Moving DB to another System
Hello Ow Mun, there are various ways to backup InnoDB tables 1. SELECT ... INTO OUTFILE statement for your tables and reimport them 2. ibbackup (a commercial tool to copy InnoDB Databases while the server is running 3. Stop the server, copy the innodb tablespace files and logfiles to the new location Option 3 is probably what you want to do. greets Rocco On 10/13/06, Ow Mun Heng [EMAIL PROTECTED] wrote: On Thu, 2006-10-12 at 23:43 -0500, Brian Ivins wrote: If the tables are myisam (not innodb), and you're moving them to a system with the same or newer version of mysql, it should work. You have the best chance of it working if the tables aren't being accessed, and you do a flush tables before you tar up the TEST_DB directory. The tables are innodb. I can stop the daemon before I do anything if it's needed. I know that some other RDBMs has the feature whereby one can just copy and attach the DB from A - B system On Fri, Oct 13, 2006 at 12:11:24PM +0800, Ow Mun Heng wrote: Subject: Moving DB to another System From: Ow Mun Heng [EMAIL PROTECTED] To: mysql@lists.mysql.com Date: Fri, 13 Oct 2006 12:11:24 +0800 X-Mailer: Evolution 2.6.2 Hi All, Wondering if it's possible for me to just tar up the DB (eg: TEST_DB) and then move it AS IS to another system? Is this possible or will I have to do a mysqldump (inclusive of create tables / data etc)?? It would be good if I can just copy (tar) the DB to another system and then re-attach the DB to the new system. Thanks -- 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: Why does MySQL accept fake date?
Hello Mark, in Versions of MySQL prior to 5.0.2 it is only checked that the year-part ranges from 1000-, the month-part from 1-12 and the day-part ranges from 1-31 within the date column. With 5.0.2 of MySQL the Dates must be legal, so 2006-02-31 is no more possible by default. You can however turn on that behavior again by using |the option ALLOW_INVALID_DATES when starting the MySQL Server. So, either you take care that valid dates are entered in your Column by checking before inserting data with your favorite scripting/programming language or upgrade to MySQL 5.0.2 which however will prevent you from inserting invalid dates in the first place. Greets Rocco | Mark wrote: Dear MySQL-ers, Using MySQL 4.1.20, in the function DAYOFWEEK(), why does MySQL accept a bogus date like '2006-02-30'? It says the 30th of February (yeah, right) starts on a the 5th day. I was going to use this to create a table of how many days there are in each month, but that's completely unusable now. Thanks, - Mark -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Why can't I delete these records?
Hello Evert, i just entered your example and had no unusal behaviour on MySQL 5.0: mysql describe table1; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | condition1 | char(1)| YES | | NULL| | | condition2 | tinyint(4) | YES | | NULL| | +++--+-+-+---+ 2 rows in set (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | A | NULL | | A | NULL | | A | NULL | | B | NULL | | C | NULL | +++ 5 rows in set (0.00 sec) mysql SELECT count(*) as counter from table1 WHERE condition1='A' and condition2 IS NULL; +-+ | counter | +-+ | 3 | +-+ 1 row in set (0.00 sec) mysql DELETE FROM table1 WHERE condition1='A' AND condition2 IS NULL; Query OK, 3 rows affected (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | B | NULL | | C | NULL | +++ 2 rows in set (0.00 sec) Maybe check again the Table definition. There is nothing wrong with with Queries you have posted in your message. Greets Rocco Evert wrote: Hi! I'm entering the statements exactly as listed in my message (only done a search/replace on table-name). So SELECT says there are 2 records, but then DELETE does not see those same 2 records... :-/ Is there something like a verbose/debug mode in which I can see more precise why my DELETE doesn't work? Regards, Evert Aleksandar Bradaric wrote: Hi, Query OK, 0 rows affected (0.00 sec) It did not find/delete any rows - please double-check your conditions and make sure you are using the same set as for the SELECT statement. Best regards, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Why can't I delete these records?
Hello Evert, i actually do not know and don't have access to a 4.1 Machine. What you could try is to use the alternative way of testing if a value is NULL: Maybe the behavior of IS NULL has been changed in 5.0 . DELETE FROM table1 WHERE condition1='A' AND condition2=NULL Greets Rocco Evert wrote: I'm using MySQL 4.1.21 (on Gentoo). Should this make any difference? Regards, Evert Rocco wrote: Hello Evert, i just entered your example and had no unusal behaviour on MySQL 5.0: mysql describe table1; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | condition1 | char(1)| YES | | NULL| | | condition2 | tinyint(4) | YES | | NULL| | +++--+-+-+---+ 2 rows in set (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | A | NULL | | A | NULL | | A | NULL | | B | NULL | | C | NULL | +++ 5 rows in set (0.00 sec) mysql SELECT count(*) as counter from table1 WHERE condition1='A' and condition2 IS NULL; +-+ | counter | +-+ | 3 | +-+ 1 row in set (0.00 sec) mysql DELETE FROM table1 WHERE condition1='A' AND condition2 IS NULL; Query OK, 3 rows affected (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | B | NULL | | C | NULL | +++ 2 rows in set (0.00 sec) Maybe check again the Table definition. There is nothing wrong with with Queries you have posted in your message. Greets Rocco Evert wrote: Hi! I'm entering the statements exactly as listed in my message (only done a search/replace on table-name). So SELECT says there are 2 records, but then DELETE does not see those same 2 records... :-/ Is there something like a verbose/debug mode in which I can see more precise why my DELETE doesn't work? Regards, Evert Aleksandar Bradaric wrote: Hi, Query OK, 0 rows affected (0.00 sec) It did not find/delete any rows - please double-check your conditions and make sure you are using the same set as for the SELECT statement. Best regards, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Batch Update of records
Hallo Neil, take a look at the utility mysqlimport which will exactly fit your needs importing those records into a database table. The basic syntax is: mysqlimport options database_name table_name.txt Tablename.txt would be your datafile with the records. The filename must match the name of the table in the database you like to import the records to. Depending on the delimiters you use to separate fields in your text file, you have to set appropriate options. The documentation on what options you have to use for type of data file can be obtained on mysql.com. Greets Rocco Neil Tompkins wrote: Hi I've am updating a database with about 20,000 records. What is the best way to perform these updates. Can I use batch updating ? Thanks Neil _ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Why can't I delete these records?
Hello Evert, the = Operator can not work with NULL values , so you have to use = or IS NULL. I have no clue why its not working at your side, but i assure you that it must be a rather simply problem (typo, table definition). Are you sure your definition2-column allows NULL values in the first place? Greets Rocco Evert wrote: Hi! I tried your tip, but = gives the same result as = when I execute the query... :-/ Regards, Evert Rocco wrote: Hello Evert, i actually do not know and don't have access to a 4.1 Machine. What you could try is to use the alternative way of testing if a value is NULL: Maybe the behavior of IS NULL has been changed in 5.0 . DELETE FROM table1 WHERE condition1='A' AND condition2=NULL Greets Rocco Evert wrote: I'm using MySQL 4.1.21 (on Gentoo). Should this make any difference? Regards, Evert Rocco wrote: Hello Evert, i just entered your example and had no unusal behaviour on MySQL 5.0: mysql describe table1; +++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +++--+-+-+---+ | condition1 | char(1)| YES | | NULL| | | condition2 | tinyint(4) | YES | | NULL| | +++--+-+-+---+ 2 rows in set (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | A | NULL | | A | NULL | | A | NULL | | B | NULL | | C | NULL | +++ 5 rows in set (0.00 sec) mysql SELECT count(*) as counter from table1 WHERE condition1='A' and condition2 IS NULL; +-+ | counter | +-+ | 3 | +-+ 1 row in set (0.00 sec) mysql DELETE FROM table1 WHERE condition1='A' AND condition2 IS NULL; Query OK, 3 rows affected (0.00 sec) mysql SELECT * FROM table1; +++ | condition1 | condition2 | +++ | B | NULL | | C | NULL | +++ 2 rows in set (0.00 sec) Maybe check again the Table definition. There is nothing wrong with with Queries you have posted in your message. Greets Rocco Evert wrote: Hi! I'm entering the statements exactly as listed in my message (only done a search/replace on table-name). So SELECT says there are 2 records, but then DELETE does not see those same 2 records... :-/ Is there something like a verbose/debug mode in which I can see more precise why my DELETE doesn't work? Regards, Evert Aleksandar Bradaric wrote: Hi, Query OK, 0 rows affected (0.00 sec) It did not find/delete any rows - please double-check your conditions and make sure you are using the same set as for the SELECT statement. Best regards, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Select on Multiple columns
Hi all, I have a trouble with multiple-column indexes, I will try to describe it with an example. Suppose I have a table like the following one: +++---+---+ | id_example | x_uno | x_due | x_desc| +++---+---+ | 1 | 2004-01-01 | 2 | qweqe | | 2 | 2004-01-01 | 3 | q | | 3 | 2004-01-01 | 4 | weqweqweq | | 4 | 2004-01-02 | 1 | QWEQWE| | 5 | 2004-01-02 | 2 | A | | 6 | 2004-01-02 | 3 | a | | 7 | 2004-01-02 | 4 | | | 8 | 2004-01-03 | 2 | 0 | | 9 | 2004-01-03 | 5 | | +++---+---+ where id_example is the Primary Key, and there is an Index on x_uno, x_due. How can I write a query in order to select records using a combination of columns x_uno and x_due? I would like, for example, to get the records starting from row number 6 (without, of course, working with the primary key, where the numbers could not necessarily be sorted as here): +++---+---+ | id_example | x_uno | x_due | x_desc | +++---+---+ | 6 | 2004-01-02 | 3 | a | | 7 | 2004-01-02 | 4 | | | 8 | 2004-01-03 | 2 | 0 | | 9 | 2004-01-03 | 5 | | +++---+---+ In fact, a select with the following syntax: SELECT * FROM `example` where x_uno=20040102 and x_due = 3 ORDER BY x_uno ASC, x_due ASC does not return me row number 8 (as it is 23 on column x_due). Of course I could use a new (redundant) column composed by the two ones, so that I have: ++---+--+---+---+ | id_example | x_composed | x_uno | x_due | x_desc| ++---+--+---+---+ | 6 | 20040102003 | 2004-01-02 | 3 | a | | 7 | 20040102004 | 2004-01-02 | 4 | | | 8 | 20040103002 | 2004-01-03 | 2 | 0 | | 9 | 20040103005 | 2004-01-03 | 5 | | ++---+--+---+---+ Anyway, I would not like to choose such a solution, as this situation would be frequent with the tables I am going to use. Is there something I am missing with SQL syntax? Thank you, Rocco Castino M.C.S. Computer Software S.r.l. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]