run query second time
Hello Today I run large query. It took more than 1 minute to start printing the results. The output was about 5 rows. However, when I run the query second time it took a couple of seconds before printing the results. Why is that? Because data still in the RAM? Thanks _ Take off on a romantic weekend or a family adventure to these great U.S. locations. http://special.msn.com/local/hotdestinations.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
order by: more that one field
Have some questions about Order By: Can a mysql query be order by more than one field? If this two queries will give different result or not? #1 select * from t1 Order by id, username; #2 select * from t2 Order by id _ Choose now from 4 levels of MSN Hotmail Extra Storage - no more account overload! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
maximum number of mysql connections and process
I have some general questions: #1 How many simultaneoulsy connection can mysql server handle? #2 Is there a limitation in how many processes can mysql handle? Thanks _ Keep up with high-tech trends here at Hook'd on Technology. http://special.msn.com/msnbc/hookedontech.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Error creating database
Make sure that you have persmission to create database. Check MySQL manual: http://www.mysql.com/doc/en/index.html From: mysql [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Error creating database Date: Sat, 7 Feb 2004 19:00:54 -0500 HI everyone: I am using a dual 800 MHz power mac G4 in which I have installed MySQL. When ever I try to create a new database in MySQL, I receive the following error mysql create database dogs; ERROR 1044 (42000): Access denied for user: ''@'localhost' to database 'dogs' Can anyone assist me in how to fix this error? Thanks. Mark -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Let the advanced features services of MSN Internet Software maximize your online time. http://click.atdmt.com/AVE/go/onm00200363ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Just simple question...
You can install MYSQL on your Windows machine and use this user interface for managing the database http://www.mysql.com/downloads/mysqlcc.html From: Dusan Spisak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Just simple question... Date: Fri, 06 Feb 2004 16:03:23 +0100 Hello everybody! I need to create some simple database. I've started to build it up in Microsoft Access. MS Access was really great for me, it was very easy and user friendly, intuitive. Without any manual I've managed to create a table, to create some views and queries and to prepare reports from them. But, I don't have MS Access at home. I don't want to use illegal software and I am not keen on buying it. That's why I've looked up MySQL. I thought MySQL could be something similar to Access, and for free, so I downloaded it. But now, I've installed it and I realized, that it's something different. There is need to run some server and i don't understand it. Here is my question: Is it possible to use MySQL in the similar way to Access? Without any servers and administration and clients and controlcenter...? I don't need any network at all, I just would like to create and run some small database for home use. Is it possible in MySQL? And, it seems, there is no user interface in MySQL at all. Am I right? Dusan - Tato sprava neobsahuje virusy. This message is virus-free. Automatic GroupWise signature added by GWAVA. - gwavasig -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Plan your next US getaway to one of the super destinations here. http://special.msn.com/local/hotdestinations.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ERROR 1205: Lock wait timeout exceeded; Try restarting transaction
I did similar insert minutes ago with no problems. Now I try to do the same insert just with differnet parameters and got such error message. insert into users(first_name, last_name) values('john', 'smith'); ERROR 1205: Lock wait timeout exceeded; Try restarting transaction Any ideas how to fix this problem? _ High-speed usersbe more efficient online with the new MSN Premium Internet Software. http://join.msn.com/?pgmarket=en-uspage=byoa/premST=1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Create users : with password
I spend some time to figure how to add users with passwords, but have problem with following: Adding user with password: PROBLEM When I insert users to database: insert into user values('localhost','test', password('123456'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); and specy the password , I cannot login t the database [EMAIL PROTECTED] mike]# mysql -h localhost -u test -p Enter password: ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) Adding user to database with no password : NO PROBLEMS But when I create user without password I have no problems: insert into user values('localhost','test', '','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); [EMAIL PROTECTED] mike]# mysql -h localhost -u test1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 to server version: 3.23.58 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql Any ideas what I'm doing wrong? _ What are the 5 hot job markets for 2004? Click here to find out. http://msn.careerbuilder.com/Custom/MSN/CareerAdvice/WPI_WhereWillWeFindJobsIn2004.htm?siteid=CBMSN3006sc_extcmp=JS_wi08_dec03_hotmail1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Slave crashed: error 'The table 'users' is full' on query..
I have more than enough space on the box. At the beginnig I check table status and got no error messages. Any ideas what can cause such error. I use mysql 4-0.13. The documentation http://www.mysql.com/doc/en/Full_table.html refer to older version of mysql. Any ideas how to fix the problem? _ Let the new MSN Premium Internet Software make the most of your high-speed experience. http://join.msn.com/?pgmarket=en-uspage=byoa/premST=1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error: 1062 Duplicate Entry '252' for key 1
Hello The slave server stop working today and I looked to the error log and the the error message is Error: 1062 Duplicate Entry '252' for key 1 And than it shows the query and time when it happens. My question is why no error messages on master server just on slave server? As I understand , all queries run on master server and than on slave server. Both servers mysql 4.1 (Red Hat). Why the problem exist on slave server only? Thanks
Re: Error: 1062 Duplicate Entry '252' for key 1
Thanks for explanation. But I don't insert anything at all to the SLAVE. It is 100%. Can the problem be problem be relative to Mysql 4.0.13 ? Thanks From: Jigal van Hemert [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Error: 1062 Duplicate Entry '252' for key 1 Date: Thu, 29 Jan 2004 14:32:51 +0100 From: Mike Mapsnac [EMAIL PROTECTED] The slave server stop working today and I looked to the error log and the the error message is Error: 1062 Duplicate Entry '252' for key 1 And than it shows the query and time when it happens. My question is why no error messages on master server just on slave server? Obviously the query the master did not cause an error. As I understand , all queries run on master server and than on slave server. Both servers mysql 4.1 (Red Hat). Why the problem exist on slave server only? The replication mechanism is currently only one way: from master to slave. So if someone has performed an insert on the slave instead of the master then this could explain why the insert on the master succeeded and the insert on the slave failed. Give the users on the slave databases the appropriate rights (no insert, delete, create, etc.) to prevent this. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Check out the new MSN 9 Dial-up fast reliable Internet access with prime features! http://join.msn.com/?pgmarket=en-uspage=dialup/homeST=1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error: 1062 Duplicate Entry '252' for key 1
Can this problem be relative to the problem with auto_increment value? Sometimes auto_increment value skips next value in insert. | 261149 | 2004-01-29 16:19:53 | | 261151 | 2004-01-29 16:20:47 | | 261152 | 2004-01-29 16:21:36 | | 261154 | 2004-01-29 16:22:47 | | 261157 | 2004-01-29 16:23:43 | Thanks From: Jigal van Hemert [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Error: 1062 Duplicate Entry '252' for key 1 Date: Thu, 29 Jan 2004 14:32:51 +0100 From: Mike Mapsnac [EMAIL PROTECTED] The slave server stop working today and I looked to the error log and the the error message is Error: 1062 Duplicate Entry '252' for key 1 And than it shows the query and time when it happens. My question is why no error messages on master server just on slave server? Obviously the query the master did not cause an error. As I understand , all queries run on master server and than on slave server. Both servers mysql 4.1 (Red Hat). Why the problem exist on slave server only? The replication mechanism is currently only one way: from master to slave. So if someone has performed an insert on the slave instead of the master then this could explain why the insert on the master succeeded and the insert on the slave failed. Give the users on the slave databases the appropriate rights (no insert, delete, create, etc.) to prevent this. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Get a FREE online virus check for your PC here, from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: updates on slave server??
Is there a way to check that data on slave server is the same as data on master ? Thanks From: Paul DuBois [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: updates on slave server?? Date: Mon, 26 Jan 2004 21:58:42 -0600 At 0:49 + 1/27/04, Mike Mapsnac wrote: Hello I found today that some data on slave server were different than on master server. I dont know how that can happen. Slave server was running, show slave status show no errors If I make some updates on slave server. Does this updates will be reflected on master server? Or slave cannot synchronize master server? You're not supposed to update the slave server, except by means of updates from the master. Updates go from master to slave, not the other way around. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
updates on slave server??
Hello I found today that some data on slave server were different than on master server. I dont know how that can happen. Slave server was running, show slave status show no errors If I make some updates on slave server. Does this updates will be reflected on master server? Or slave cannot synchronize master server? Thanks _ Rethink your business approach for the new year with the helpful tips here. http://special.msn.com/bcentral/prep04.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How to write such query?
I want to get distinct title from table titles. But there are two differnt titles (new and used).So I need somehow join all three tables where user_tiles status='true' and titles are distinctive. Thanks titles +---+---+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-++ | title_id | int(5)| | PRI | NULL| auto_increment | | titles| varchar(5)| | MUL | | | | quantity | int(5)| | | 0 | | | condition | enum('new', 'used') | | | | | +---+---+--+-+-++ new_titles ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | title_id | int(8) | | PRI | 0 | | | cost | decimal(5,2) | | | 0.00| | used_titles ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | title_id | int(8) | | PRI | 0 | | | status | enum('true','false') | | | true| | _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
temporary tables
Which of these three joins are using temporary table? # 1 Inner Join # 2 Left Join #3 Outer Join Thanks
Select help
Hello I want to select from the table sum of logins for each day. For example: Date Logins 2004-01-22 10 2004-01-23 12 Any ideas if such select is possible? +--+--+ | Field| Type | +--+--+ | login_count | int(4) | | last_login | datetime | _ Rethink your business approach for the new year with the helpful tips here. http://special.msn.com/bcentral/prep04.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Left Outer Join?
What is the difference between Left Join and Left Outer Join? Thanks
Kill alter table process?
I run alter today on table with 380,000 records. 'Alter' was adding column to the table. It took 10 minutes and server load went up to 15. alter table info add column interactive_email enum('on','off') NOT NULL default 'on'; Here comes my questions: #1 If I kill the process after it was running for 5 minutes. Would it update some records and some records not? #2 How dangerous is to stop alter? #3 What is a good way to stop alter or update without damaging database? Thanks _ Find high-speed net deals comparison-shop your local providers here. https://broadband.msn.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Kill alter table process?
Thanks for good explnation. Some more questions: #1Does 'update' also create temporary table? #2What happend with old table after alter? From: mos [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Kill alter table process? Date: Wed, 21 Jan 2004 19:12:07 -0600 At 05:34 PM 1/21/2004, you wrote: I run alter today on table with 380,000 records. 'Alter' was adding column to the table. It took 10 minutes and server load went up to 15. alter table info add column interactive_email enum('on','off') NOT NULL default 'on'; Here comes my questions: #1 If I kill the process after it was running for 5 minutes. Would it update some records and some records not? #2 How dangerous is to stop alter? #3 What is a good way to stop alter or update without damaging database? Thanks Mike, Alter creates a copy of the table so stopping it in the middle won't hurt anything. If the Alter succeeds, it renames the new table to the old table name. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Increment value
In the table value login_count is int(4). For example if value login_count equal to 3 and each time user login I want to increment by one. update customer set login_count='how? where id=12121212; What function I should use in order to icrement the value? _ Check out the coupons and bargains on MSN Offers! http://shopping.msn.com/softcontent/softcontent.aspx?scmId=1418 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Increment value
I know that. I'm lookign for mysql function that will increment the value. From: Tobias Asplund [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Increment value Date: Tue, 20 Jan 2004 23:36:22 +0100 (CET) On Tue, 20 Jan 2004, Mike Mapsnac wrote: In the table value login_count is int(4). For example if value login_count equal to 3 and each time user login I want to increment by one. update customer set login_count='how? where id=12121212; SET login_count = login_count + 1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Get a FREE online virus check for your PC here, from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: table info
I think that main disadvantage of this command is thah it works for the database but not for specific table. So if a database has 200 tables, find result for specific table is not an easy task. From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: table info Date: Mon, 19 Jan 2004 14:10:37 +0200 Mike Mapsnac [EMAIL PROTECTED] wrote: Is it possible to find out when the table was created? How to get information about the table? SHOW TABLE STATUS command provides info about table: http://www.mysql.com/doc/en/SHOW_TABLE_STATUS.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Rethink your business approach for the new year with the helpful tips here. http://special.msn.com/bcentral/prep04.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Mysql Installation on Linux: ERROR 2002: Can't connect tolocal MySQL server
Weird. I cannot find the my.cnf (configuration file).. How that's possible? Thanks From: Victor Medina [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Mysql Installation on Linux: ERROR 2002: Can't connect tolocal MySQL server th Date: Sun, 18 Jan 2004 10:24:53 -0400 Probably your server is not using any sockets, check out your my.cnf. man mysql to see how to connect to a ip based mysql host. C/ya! On Sat, 2004-01-17 at 18:51, Mike Mapsnac wrote: I just install MYSQL on Linux (Red Hat 9) using this manual:http://www.mysql.com/doc/en/Installing_binary.html Have no idea what's wrong. I looked on the mysql.log file and the file is empty. ERROR MESSAGE: [EMAIL PROTECTED] bin]# ./mysql ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [EMAIL PROTECTED] bin]# ./mysql status ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' _ Scope out the new MSN Plus Internet Software optimizes dial-up to the max! http://join.msn.com/?pgmarket=en-uspage=byoa/plusST=1 -- |...| | _ _|Victor Medina M | |\ \ \| | _ \ / \ |Linux - Java - MySQL | | \ \ \ _| | |_) / _ \ |Dpto. Sistemas - Ferreteria EPA | | / / / |___| __/ ___ \ |[EMAIL PROTECTED] | |/_/_/|_|_| /_/ \_\|ext. 325 | ||geek by nature - linux by choice | |...| ... Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Rich Cook _ Check out the new MSN 9 Dial-up fast reliable Internet access with prime features! http://join.msn.com/?pgmarket=en-uspage=dialup/homeST=1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
table info
Is it possible to find out when the table was created? How to get information about the table? Thanks
Mysql Installation on Linux: ERROR 2002: Can't connect to local MySQL server th
I just install MYSQL on Linux (Red Hat 9) using this manual:http://www.mysql.com/doc/en/Installing_binary.html Have no idea what's wrong. I looked on the mysql.log file and the file is empty. ERROR MESSAGE: [EMAIL PROTECTED] bin]# ./mysql ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [EMAIL PROTECTED] bin]# ./mysql status ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' _ Scope out the new MSN Plus Internet Software optimizes dial-up to the max! http://join.msn.com/?pgmarket=en-uspage=byoa/plusST=1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql.sock
What is the purpose of mysql.sock file in mysql? A lot of problems are assosiate with this file.
insert: auto increment field
I have table with 7 fields. First field is id (auto increment). As I understand the value should start from 0 and next value will auto increment. And I shouldn't add insert the value. So the insert statemens below gives me an error. ERROR 1136:Column count doesn't match value count at row 1 insert into product values('456789','t1', 'new', 2, 2, 10); _ Have fun customizing MSN Messenger learn how here! http://www.msnmessenger-download.com/tracking/reach_customize -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: insert: auto increment field
I use both metods and they works But when I make another insert I receive a message ERROR: 1062 Duplicate entry '2147483647' for key 1. Why id (primaty , and auto_increment) start from 2147483647 and not from 0 or 1 Thanks From: Donald Henson [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Subject: Re: insert: auto increment field Date: Sun, 04 Jan 2004 08:44:56 -0700 On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote: I have table with 7 fields. First field is id (auto increment). As I understand the value should start from 0 and next value will auto increment. And I shouldn't add insert the value. So the insert statemens below gives me an error. ERROR 1136:Column count doesn't match value count at row 1 insert into product values('456789','t1', 'new', 2, 2, 10); Try using NULL for the id field, thusly: insert into product values (NULL,'456789','t1','new',2,2,10); I didn't actually try this but it should work. Don Henson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Get reliable dial-up Internet access now with our limited-time introductory offer. http://join.msn.com/?page=dept/dialup -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: insert: auto increment field
I delete all records from the table and cannot insert second element to the table. Auto increment starts with higher number .. ERROR 1062: Duplicate entry '2147483647' for key 1 From: Larry Brown [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED],MySQL List [EMAIL PROTECTED] Subject: RE: insert: auto increment field Date: Sun, 4 Jan 2004 19:09:59 -0500 Is this a test db? If so go ahead and drop your records so there are none in there and start entering them and checking their id as you do. After dropping all records it should start back at 1 and increment forward. I don't know how the index went up to max for that field. Perhaps something during previous tests. If you can't drop the current records document that in your reply and maybe someone else can give another suggestion. -Original Message- From: Mike Mapsnac [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 6:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: insert: auto increment field I use both metods and they works But when I make another insert I receive a message ERROR: 1062 Duplicate entry '2147483647' for key 1. Why id (primaty , and auto_increment) start from 2147483647 and not from 0 or 1 Thanks From: Donald Henson [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Subject: Re: insert: auto increment field Date: Sun, 04 Jan 2004 08:44:56 -0700 On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote: I have table with 7 fields. First field is id (auto increment). As I understand the value should start from 0 and next value will auto increment. And I shouldn't add insert the value. So the insert statemens below gives me an error. ERROR 1136:Column count doesn't match value count at row 1 insert into product values('456789','t1', 'new', 2, 2, 10); Try using NULL for the id field, thusly: insert into product values (NULL,'456789','t1','new',2,2,10); I didn't actually try this but it should work. Don Henson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Get reliable dial-up Internet access now with our limited-time introductory offer. http://join.msn.com/?page=dept/dialup -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] _ Check your PC for viruses with the FREE McAfee online computer scan. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: insert: auto increment field
It solved the problem. But what truncate does? Just deletes the rows? From: Daniel Kasak [EMAIL PROTECTED] To: Larry Brown [EMAIL PROTECTED],Mike Mapsnac [EMAIL PROTECTED], MySQL List [EMAIL PROTECTED] Subject: Re: insert: auto increment field Date: Mon, 05 Jan 2004 11:18:08 +1100 Larry Brown wrote: Is this a test db? If so go ahead and drop your records so there are none in there and start entering them and checking their id as you do. After dropping all records it should start back at 1 and increment forward. I don't know how the index went up to max for that field. Perhaps something during previous tests. If you can't drop the current records document that in your reply and maybe someone else can give another suggestion. Deleting the records isn't sufficient to reset an autoincrement field. You should do a 'truncate table my_table_name' to reset an autoincrement field ( I believe this does a drop table / recreate table process ). -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au _ Make your home warm and cozy this winter with tips from MSN House Home. http://special.msn.com/home/warmhome.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: insert: auto increment field
Thanks. Just for curiosity. Why truncate was necessary in my case? I just create a table and try to insert some values. From: Daniel Kasak [EMAIL PROTECTED] To: Mike Mapsnac [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: insert: auto increment field Date: Mon, 05 Jan 2004 11:34:35 +1100 Mike Mapsnac wrote: It solved the problem. But what truncate does? Just deletes the rows? It's the same as doing: drop table create table ( schema from dropped table above ) -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] _ Get reliable dial-up Internet access now with our limited-time introductory offer. http://join.msn.com/?page=dept/dialup -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Table: NULL (yes or no)
I create two tables. And when I do desc table_name; NULL value can be 'Yes' or 'No'. What the difference when NULL value is 'Yes' or 'No Thanks _ Worried about inbox overload? Get MSN Extra Storage now! http://join.msn.com/?PAGE=features/es -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Delete logs: not enough space on /var/lib/mysql
I don't have enough space on /var/lib/mysql partition. What logs can be deleted from the partition? Is it possible don't delete last logs? Thanks _ Worried about inbox overload? Get MSN Extra Storage now! http://join.msn.com/?PAGE=features/es -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Alter table and setup Default value
I use MYSQL 4. I can modify or alter a column with no problems. But how I can alter table and setup Default value. The column below has default value NULL, but I want to setup default value used. How that's can be done? type | enum('new',used') | YES | | NULL|| _ Have fun customizing MSN Messenger learn how here! http://www.msnmessenger-download.com/tracking/reach_customize -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql.sock permission srwxrwxrwx
I'm trying to open mysql.sock file as a ROOT and receive the error message permission denied. Why mysql.sock has such permission? _ Tired of slow downloads? Compare online deals from your local high-speed providers now. https://broadband.msn.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Replication Problems: Ignore table
The replication between two servers works. But I tried to disable replication on one table. According to the MYSQL Documentation. I did the following: #1 stop Slave #2 Modified my.cnf on slave [mysqld] server-id=3 master-host=192.168.1.129 master-user=aert12 master-password=password replicate-ignore-table=info.notes # Added this Line #3 Restarted slave server /etc/init.d/mysql restart #4 start slave show status slave shows that replication is running , but actually it doesnt. I even can type start slave many times with no warning. Previously I got an error message if I try to start slave that is running. What I did wrong? _ Working moms: Find helpful tips here on managing kids, home, work and yourself. http://special.msn.com/msnbc/workingmom.armx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]