Re: NET START MYSQL QUESTION?
Hello Reindl, On 5/11/2013 11:52 AM, Reindl Harald wrote: ... virtually nonofy is using mysql on windows seriously as i have not touched windows since 2006 at all Your experience is not indicative of the population as a whole. Many important and mission-critical installations exist on Windows. You may not, or ever, choose to use Windows as a base platform but many people do and do superbly with their choice of OS. -- Shawn Green MySQL Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: [Suspected Spam][Characteristics] Re: NET START MYSQL QUESTION?
why not answer the question another user made hours ago? under which account do you try to start mysqld? Agreed. Chances are good that if he goes into the Windows Services control panel and gets the properties of the mysql service, he will find that it is configured to start under a Windows account other than the System account, and that the Windows account in question either does not have the required privileges or it is locked. I'd probably just change it to start under the System account. --Erio Disclaimer - May 12, 2013 This email and any files transmitted with it are confidential and intended solely for Reindl Harald,mysql@lists.mysql.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physicians' Managed Care or Physician Select Management. Warning: Although Physicians' Managed Care or Physician Select Management has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. This disclaimer was added by Policy Patrol: http://www.policypatrol.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: NET START MYSQL QUESTION?
Am 11.05.2013 16:50, schrieb SIVASUTHAN NADARAJAH: I want to start the mysql from command prompt using NET START MYSQLBUT the server not started. It display an error message. C:\Users\PC NET START MySQLSystem error 5 has occurred. Access is denied. could you please help me, how to start the Mysql service FROM command prompt? what about look in the mysqld-log and verify which account is used by the windows service? there is no difference between the GUI and net start, a service works or not * log-files * service details (useraccount, credentials..) * permissions to logfiles / datadir. btw: do not use uppercase letters in your whole subject! signature.asc Description: OpenPGP digital signature
Re: NET START MYSQL QUESTION?
DO NOT REPLY OFF-LIST there is no step by step guidance and virtually nonofy is using mysql on windows seriously as i have not touched windows since 2006 at all understand how services on your used OS are working or hire someone who does Am 11.05.2013 17:44, schrieb SIVASUTHAN NADARAJAH: Sorry I could not understand your answer. please give me the step by step guidance. thank you so much... Date: Sat, 11 May 2013 16:58:16 +0200 From: h.rei...@thelounge.net To: mysql@lists.mysql.com Subject: Re: NET START MYSQL QUESTION? Am 11.05.2013 16:50, schrieb SIVASUTHAN NADARAJAH: I want to start the mysql from command prompt using NET START MYSQLBUT the server not started. It display an error message. C:\Users\PC NET START MySQLSystem error 5 has occurred. Access is denied. could you please help me, how to start the Mysql service FROM command prompt? what about look in the mysqld-log and verify which account is used by the windows service? there is no difference between the GUI and net start, a service works or not * log-files * service details (useraccount, credentials..) * permissions to logfiles / datadir. btw: do not use uppercase letters in your whole subject! signature.asc Description: OpenPGP digital signature
Re: NET START MYSQL QUESTION?
On 11.05.2013 17:50, SIVASUTHAN NADARAJAH wrote: C:\Users\PC NET START MySQL System error 5 has occurred. Access is denied. Run command window from elevated permission. -- Mimiko desu. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: NET START MYSQL QUESTION?
Am 11.05.2013 20:04, schrieb Mimiko: On 11.05.2013 17:50, SIVASUTHAN NADARAJAH wrote: C:\Users\PC NET START MySQL System error 5 has occurred. Access is denied. Run command window from elevated permission wow - you mean he *really* tried to start a service as restricted user and instead read the basic manuals posted to the application list? hopefully not... signature.asc Description: OpenPGP digital signature
Re: NET START MYSQL QUESTION?
2013/05/11 20:50 +0600, SIVASUTHAN NADARAJAH I want to start the mysql from command prompt using NET START MYSQLBUT the server not started. It display an error message. C:\Users\PC NET START MySQLSystem error 5 has occurred. Access is denied. could you please help me, how to start the Mysql service FROM command prompt? SIVASUTHAN- Consultant Trainer Well, ordinarily the MySQL service is started by Windows along with all the rest: After installing MySQL under Windows one runs MySQL Instance Configuration Wizard--the only MySQL program on my system that runs from Start. (If you cannot do this on the machine where mysqld.exe is to run I do not know what to say.) If the service, with program mysqld.exe, quits, to start it one enters start mysqld -b... from the command line, with the directory where my.ini is kept entered for Of course, if mysqld.exe started and quit, as Reindl Harald suggested study the logs and find out why. It is not started through the client, mysql.exe. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: NET START MYSQL QUESTION?
Am 11.05.2013 21:49, schrieb h...@tbbs.net: 2013/05/11 20:50 +0600, SIVASUTHAN NADARAJAH I want to start the mysql from command prompt using NET START MYSQLBUT the server not started. It display an error message. C:\Users\PC NET START MySQLSystem error 5 has occurred. Access is denied. could you please help me, how to start the Mysql service FROM command prompt? why not answer the question another user made hours ago? under which account do you try to start mysqld? hence you need FULL ADMIN PRIVILEGES on every OS to start services or use the system settings which at least come up with a UAC request alternative: use a proper operating system with a package-manager google: windows system error 5 https://www.google.com/search?q=windows+system+error+5 thid *is not* a MySQL problem please ask windows questions at windows forums It is not started through the client, mysql.exe why should the client start a server? signature.asc Description: OpenPGP digital signature
Re: NET START MYSQL QUESTION?
2013/05/11 22:58 +0200, Reindl Harald why not answer the question another user made hours ago? under which account do you try to start mysqld? Well, I learnt something here. When I had the problem of (under Vista) starting mysqld, from command prompt I always did this, start mysqld -b... (here start is like Unix s trailing ), and never had a problem. It showed up running on the service list. Maybe something like Unix s set-user-id is in effect in mysqld.exe. Now for the first time I learn of command NET, and its options. I do not remember seeing net start MySQL in MySQL s help when I installed it, only that which I above described. This is not so much an OS problem, but a problem at the point where the OS s peculiarities and a big package s nature intersect. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Fw: General MySQL Question
- Forwarded Message From: MySQL Web Team webmas...@mysql.com To: christudas_...@yahoo.com Sent: Wednesday, July 8, 2009 3:46:09 Subject: Re:General MySQL Question Thank you for contacting MySQL, You are likely to get a more detailed response to your question if you ask on the forums site at http://forums.mysql.com/ or on an appropriate mailing list at http://lists.mysql.com/ Hope this helps, MySQL Web Team === Your query was: Hi, I have an existing database for one of our elearning portals. This support request is to give us information on how an already existing database can be encrypted? Is there a query that can encrypt the database? we are planning to use the ENCODE() and DECODE()for encoding the data into the database and decrypting the data while retrieving information from database. Pls do let us know. Thanks Regards, Christy -- MySQL http://www.mysql.com/ If you wish to unsubscribe from future email communication from MySQL please visit http://www.mysql.com/unsubscribe and enter your email address. If you do not wish to receive email communications from Sun, please click here http://www.sun.com/cgi-bin/sun/dne/ or forward this message to rem...@sun.com. Get your new Email address! Grab the Email name you#39;ve always wanted before someone else does! http://mail.promotions.yahoo.com/newdomains/aa/
RE: PHP-MYSQL Question
Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: PHP-MYSQL Question
# perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: PHP-MYSQL Question
Table1 is as below: CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(table1_id), entrytitle VARCHAR(100) NOT NULL, entrytext TEXT NOT NULL, entrydate TIMESTAMP NOT NULL) ); I did not put the engine. Could that be the problem? Date: Tue, 7 Apr 2009 17:48:16 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question # perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us -- С уважением, Евгений Косов _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
Re: PHP-MYSQL Question
Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: PHP-MYSQL Question
I suppose the problem is that table1.table1_id and table2.table1_id are of different types. The first one is INT UNSIGNED and the second is just INT. abdulazeez alugo wrote: Table1 is as below: CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(table1_id), entrytitle VARCHAR(100) NOT NULL, entrytext TEXT NOT NULL, entrydate TIMESTAMP NOT NULL) ); I did not put the engine. Could that be the problem? Date: Tue, 7 Apr 2009 17:48:16 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question # perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us -- С уважением, Евгений Косов check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
PHP-MYSQL Question
Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
RE: PHP-MYSQL Question
I've tried it and i still got the same error. I even dropped table1 and recreated it to include the ENGINE=InnoDB and it was successful but table2 remains unsuccessful. Date: Tue, 7 Apr 2009 17:56:49 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question I suppose the problem is that table1.table1_id and table2.table1_id are of different types. The first one is INT UNSIGNED and the second is just INT. abdulazeez alugo wrote: Table1 is as below: CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(table1_id), entrytitle VARCHAR(100) NOT NULL, entrytext TEXT NOT NULL, entrydate TIMESTAMP NOT NULL) ); I did not put the engine. Could that be the problem? Date: Tue, 7 Apr 2009 17:48:16 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question # perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us -- С уважением, Евгений Косов check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
Re: PHP-MYSQL Question
it is not the ENGINE as Eugene mentioned above, is that you need to use UNSIGNED when creating the second table CREATE TABLE table2 ( table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB 2009/4/7 abdulazeez alugo defati...@hotmail.com I've tried it and i still got the same error. I even dropped table1 and recreated it to include the ENGINE=InnoDB and it was successful but table2 remains unsuccessful. Date: Tue, 7 Apr 2009 17:56:49 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question I suppose the problem is that table1.table1_id and table2.table1_id are of different types. The first one is INT UNSIGNED and the second is just INT. abdulazeez alugo wrote: Table1 is as below: CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(table1_id), entrytitle VARCHAR(100) NOT NULL, entrytext TEXT NOT NULL, entrydate TIMESTAMP NOT NULL) ); I did not put the engine. Could that be the problem? Date: Tue, 7 Apr 2009 17:48:16 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question # perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed What does table1 look like? abdulazeez alugo wrote: Yeah I used the mysql_error and it returned Can't create table '.\website\table2.frm' (errno: 150). So what does that say? Date: Tue, 7 Apr 2009 17:38:59 +0400 From: evge...@kosov.su To: defati...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: PHP-MYSQL Question Perhaps you don't have permissions to create tables? It would have been much clearer if your script was like this: $result=mysql_query($your_create_table_statement); if($result){ printSuccessful;} else {print Unsuccessful: .mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyone tell me what I'm doing wrong with the code below? It keep returning unsuccessful. $result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB ); if($result){ printSuccessful;} else {print Unsuccessful;} Thanks in advance. Cheers. Alugo Abdulazeez. _ More than messages-check out the rest of the Windows Live(tm). http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=defati...@hotmail.com _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us -- С уважением, Евгений Косов check out the rest of the Windows Live(tm). More than mail-Windows Live(tm) goes way beyond your inbox. More than messages http://www.microsoft.com/windows/windowslive/ -- С уважением, Евгений Косов _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx -- Spiros P.
RE: PHP-MYSQL Question
I've done that but it still gives the same error message. Date: Tue, 7 Apr 2009 16:25:15 +0200 Subject: Re: PHP-MYSQL Question From: spa...@googlemail.com To: defati...@hotmail.com CC: mysql@lists.mysql.com it is not the ENGINE as Eugene mentioned above, is that you need to use UNSIGNED when creating the second table CREATE TABLE table2 ( table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
RE: PHP-MYSQL Question
Alright guys, I just solved the problem. I read from somewhere that if you're using a foreign key, it should be the either the primary key in the table or the index so since I already used auto increment on table2_id and I've already made it my Primary key, I just made table1_id the index and it returned successful. So that was the problem all along. Thanks for your suggestions. Best regards Alugo Abdulazeez. From: defati...@hotmail.com To: spa...@googlemail.com CC: mysql@lists.mysql.com Subject: RE: PHP-MYSQL Question Date: Tue, 7 Apr 2009 15:32:25 +0100 I've done that but it still gives the same error message. Date: Tue, 7 Apr 2009 16:25:15 +0200 Subject: Re: PHP-MYSQL Question From: spa...@googlemail.com To: defati...@hotmail.com CC: mysql@lists.mysql.com it is not the ENGINE as Eugene mentioned above, is that you need to use UNSIGNED when creating the second table CREATE TABLE table2 ( table2_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, table1_id INT UNSIGNED NOT NULL, name VARCHAR(100) NOT NULL, school VARCHAR(100) NOT NULL, comment TEXT NOT NULL, entrydate TIMESTAMP NOT NULL, FOREIGN KEY(table1_id) REFERENCES table1(table1_id)) ENGINE = INNODB _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx
mysql question.
hi i need help regarding a sql query in my php app. the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; i want to sort this query by the number of the repeated EMail counts. can anyone help me with that please ?
Re: mysql question.
Hmmm, using distinct email in a query where you want to count email won't work. select mail, count(mail) as mailcnt from guest where voted='yes' group by mail order by mailcnt; should do the trick. On Tue, April 3, 2007 12:51, Me2resh Lists wrote: hi i need help regarding a sql query in my php app. the query is : $SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list; i want to sort this query by the number of the repeated EMail counts. can anyone help me with that please ? -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean. -- Later Mogens Melander +45 40 85 71 38 +66 870 133 224 -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium
Great idea! Tips on how to get around, good local restaurants (if you like Vietnamese, San Jose is the place), and other things to do when you need a break... There is really a great deal just a short distance away, but you have to know how to get there. It's possible there was something like this last year, but I live in the area so I didn't look for it. I'm in full agreement that a conference is just that much better when it includes a little variety, a chance to get away from the drab convention hall, and a chance to socialize a little. One thing I suggest is to attend the Quiz Show (Wed 8pm) or other after hours activities. Great fun, and a good way to hook up with people for dinner or drinks away from the center. Eric -- Eric Braswell Web Manager MySQL AB Cupertino, USA Mike Wexler wrote: The area by the Santa Clara convention center is pretty dead, but you can take the light rail to downtown San Jose and there is a pretty lively nightlife there, lots of interesting restaurants, The Tech Museum and other things depending on you interests. Also there are lots more interesting places to eat than sizzler within in 5 minute drive of the convention center. Perhaps what is needed is either a nice cheatsheet of what to do and where to go? Or perhaps some of the locals could volunteer to be ambassadors and take people with similar interests to local activities, restaurants or points of interest. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: General MySQL Question: Ed Reed (CA, United States of America) Medium
Hi Ed, the subject line of your message indicates you live in California in which case Santa Clara won't add much to the experience, but most other people could enjoy visiting California a lot especially if they don't mind dedicating entire day driving to Sierra Nevada. One off the beaten path route is to cross the Sierra on hwy 108, pass by Lake Mono and return on hwy 120 through Yosemite. Even around Santa Clara there are some possibilities for a good drive, try to get to the observatory in San Jose (hwy 103 or 104), or just cross the Coastal range around Santa Clara and take hwy 1 North to San Francisco. Other than the natural beauty the place is pretty sterile but from my experience it applies to most of the country anyway. The clubs in downtown San Jose are decent especially if you manage to find one with live music. I'd consider visiting one of mysql conferences if they had one in a nice place like Panama City (in Panama, not in Florida). Thanks, Michael -Original Message- From: [EMAIL PROTECTED] To: mysql@lists.mysql.com; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Mon, 29 Jan 2007 4:57 PM Subject: Re: General MySQL Question: Ed Reed (CA, United States of America) Medium I just didn't enjoy the location. When it was in Orlando a few years ago, it was great. There were plenty of things to do and see; different places to eat every night. I had a really good time. Then the following year I went to Santa Clara and there was nothing to do. I went to the movies one night. Had dinner at Sizzler three times. I drove 45 minutes to find a place I could buy a shirt. The rest of the time I stayed in the hotel and watched crappy tv. If you folks want me to be away from my family and friends for five days you've gotta give me a reason to wanna go besides the great technical information. I didn't go to last years, I'm not going to this years and I probably won't go to any future ones held in Santa Clara. When I came home from the last one, my kids asked what I got them from my trip and I had nothing for them. It was just a boring place to go and I don't wanna go back. I'd just like to see it held someplace new every year. Thanks for replying to my comment Lenz Grimmer [EMAIL PROTECTED] 1/25/07 2:21 AM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ed, thank you for your message! On Thu, 18 Jan 2007, Ed Reed has filled out the MySQL Contact Form with a General MySQL Question: Can someone tell me you folks are going to hold all future User Conferences in Santa Clara? I would like to go this year but I didn't enjoy myself at the last one I went to in Santa Clara in '05 and I don't wanna go back. If you folks plan to hold all future conferences there I'd like to know so I can resign myself to the fact that it's never gonna change instead of hoping that it's gonna be somewhere else every year. To be honest, it's not entirely clear yet if we will change the location for upcoming events. But could you explain why you didn't enjoy yourself at the last one? How can we improve? Bye, LenZ - -- Lenz Grimmer [EMAIL PROTECTED] Community Relations Manager, EMEA MySQL GmbH, http://www.mysql.de/, Hamburg, Germany Visit the MySQL Forge at http://forge.mysql.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFFuISeSVDhKrJykfIRAsJxAJ9hLkjhA10B68OHpw97x6QHbSqjLACePQym m9lEE93nxdC+K//cQsL658Q= =W/8N -END PGP SIGNATURE- Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium
If you are into ancient Egypt, check out the Rosicrucian museum in San Jose. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Eric Braswell [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 30, 2007 3:02 AM To: Mike Wexler Cc: Ed Reed; mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: Re: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium Great idea! Tips on how to get around, good local restaurants (if you like Vietnamese, San Jose is the place), and other things to do when you need a break... There is really a great deal just a short distance away, but you have to know how to get there. It's possible there was something like this last year, but I live in the area so I didn't look for it. I'm in full agreement that a conference is just that much better when it includes a little variety, a chance to get away from the drab convention hall, and a chance to socialize a little. One thing I suggest is to attend the Quiz Show (Wed 8pm) or other after hours activities. Great fun, and a good way to hook up with people for dinner or drinks away from the center. Eric -- Eric Braswell Web Manager MySQL AB Cupertino, USA Mike Wexler wrote: The area by the Santa Clara convention center is pretty dead, but you can take the light rail to downtown San Jose and there is a pretty lively nightlife there, lots of interesting restaurants, The Tech Museum and other things depending on you interests. Also there are lots more interesting places to eat than sizzler within in 5 minute drive of the convention center. Perhaps what is needed is either a nice cheatsheet of what to do and where to go? Or perhaps some of the locals could volunteer to be ambassadors and take people with similar interests to local activities, restaurants or points of interest. -- 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]
Getting OT re San Jose (was RE: General MySQL Question: Ed Reed (CA, United States of America) Medium)
I'd second the Rosicrucian Egyptian Museum: http://www.egyptianmuseum.org/ Also the Computer History Museum (located in the former SGI International Sales Office, I believe) is HIGHLY recommended by me...one of the docents there the last time I visited was Gene Amdahl! They have a working PDP-1, Cray 1, 2, 3 and Y-MP, and one of Google's first server racks, among tons of other stuff. They're in Mountain View, but it's not far, and would amply justify a carpool: http://www.computerhistory.org/ Intel's museum is in Santa Clara (never been there myself): http://www.intel.com/museum/index.htm And the San Jose Museum of Art: http://www.sjmusart.org/ I found this exhibition to be quite interesting: http://www.sjmusart.org/content/exhibitions/current/exhibition_info.phtml?itemID=324 And if you have kids with you (including inner children...), there's http://www.cdm.org/ Never been there, though, so I can't vouch for it. Interested in aviation/space? http://www.moffettfieldmuseum.org/ http://www.nasa.gov/centers/ames/home/exploration.html http://www.hiller.org/ steve, museum nerd At 10:16 AM -0500 1/30/07, Jerry Schwartz wrote: If you are into ancient Egypt, check out the Rosicrucian museum in San Jose. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Eric Braswell [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 30, 2007 3:02 AM To: Mike Wexler Cc: Ed Reed; mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: Re: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium Great idea! Tips on how to get around, good local restaurants (if you like Vietnamese, San Jose is the place), and other things to do when you need a break... There is really a great deal just a short distance away, but you have to know how to get there. It's possible there was something like this last year, but I live in the area so I didn't look for it. I'm in full agreement that a conference is just that much better when it includes a little variety, a chance to get away from the drab convention hall, and a chance to socialize a little. One thing I suggest is to attend the Quiz Show (Wed 8pm) or other after hours activities. Great fun, and a good way to hook up with people for dinner or drinks away from the center. Eric -- Eric Braswell Web Manager MySQL AB Cupertino, USA Mike Wexler wrote: The area by the Santa Clara convention center is pretty dead, but you can take the light rail to downtown San Jose and there is a pretty lively nightlife there, lots of interesting restaurants, The Tech Museum and other things depending on you interests. Also there are lots more interesting places to eat than sizzler within in 5 minute drive of the convention center. Perhaps what is needed is either a nice cheatsheet of what to do and where to go? Or perhaps some of the locals could volunteer to be ambassadors and take people with similar interests to local activities, restaurants or points of interest. -- +--- my people are the people of the dessert, ---+ | Steve Edberghttp://pgfsun.ucdavis.edu/ | | UC Davis Genome Center[EMAIL PROTECTED] | | Bioinformatics programming/database/sysadmin (530)754-9127 | + said t e lawrence, picking up his fork + -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: General MySQL Question: Ed Reed (CA, United States of America) Medium
I just didn't enjoy the location. When it was in Orlando a few years ago, it was great. There were plenty of things to do and see; different places to eat every night. I had a really good time. Then the following year I went to Santa Clara and there was nothing to do. I went to the movies one night. Had dinner at Sizzler three times. I drove 45 minutes to find a place I could buy a shirt. The rest of the time I stayed in the hotel and watched crappy tv. If you folks want me to be away from my family and friends for five days you've gotta give me a reason to wanna go besides the great technical information. I didn't go to last years, I'm not going to this years and I probably won't go to any future ones held in Santa Clara. When I came home from the last one, my kids asked what I got them from my trip and I had nothing for them. It was just a boring place to go and I don't wanna go back. I'd just like to see it held someplace new every year. Thanks for replying to my comment Lenz Grimmer [EMAIL PROTECTED] 1/25/07 2:21 AM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ed, thank you for your message! On Thu, 18 Jan 2007, Ed Reed has filled out the MySQL Contact Form with a General MySQL Question: Can someone tell me you folks are going to hold all future User Conferences in Santa Clara? I would like to go this year but I didn't enjoy myself at the last one I went to in Santa Clara in '05 and I don't wanna go back. If you folks plan to hold all future conferences there I'd like to know so I can resign myself to the fact that it's never gonna change instead of hoping that it's gonna be somewhere else every year. To be honest, it's not entirely clear yet if we will change the location for upcoming events. But could you explain why you didn't enjoy yourself at the last one? How can we improve? Bye, LenZ - -- Lenz Grimmer [EMAIL PROTECTED] Community Relations Manager, EMEA MySQL GmbH, http://www.mysql.de/, Hamburg, Germany Visit the MySQL Forge at http://forge.mysql.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFFuISeSVDhKrJykfIRAsJxAJ9hLkjhA10B68OHpw97x6QHbSqjLACePQym m9lEE93nxdC+K//cQsL658Q= =W/8N -END PGP SIGNATURE-
[OT] Re: General MySQL Question: Ed Reed (CA, United States of America) Medium
On Monday 29 January 2007 12:57, Ed Reed wrote: I just didn't enjoy the location. When it was in Orlando a few years ago, it was great. There were plenty of things to do and see; different places to eat every night. I had a really good time. Then the following year I went to Santa Clara and there was nothing to do. I went to the movies one night. Had dinner at Sizzler three times. I drove 45 minutes to find a place I could buy a shirt. The rest of the time I stayed in the hotel and watched crappy tv. If you folks want me to be away from my family and friends for five days you've gotta give me a reason to wanna go besides the great technical information. I didn't go to last years, I'm not going to this years and I probably won't go to any future ones held in Santa Clara. When I came home from the last one, my kids asked what I got them from my trip and I had nothing for them. It was just a boring place to go and I don't wanna go back. I'd just like to see it held someplace new every year. Thanks for replying to my comment That's funny...when I go to a technical conference, I usually go for the conference, and couldn't care less if there is other stuff to do in the area during the off hours. j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium
I understand that. I go there for the same thing. My point was that, the conference needs the attendees as much we want the conference. When I go I'm going for the conference stuff but I have a life and they're asking us to give up that life for maybe 6 days. After a the second day things start to get a little monotonous and we need a break. After the third or fourth day the brain is fried. There needs to be some kind of other activity that takes your mind off of the same hotel walls. Let's put it another way. When you go to work do you stay there for 5 days straight? Probably not. You go home, you go out to dinner. You see friends. You do other things to take your mind away from work because you have to recharge your batteries. It's the same thing at the conferences. Unless you're a robot you have to get out and see the sights and be entertained so that you can go back the next day and absorb the next days meetings. I just liked it better when it felt like it was gonna be held at a different location every year. I made this same complaint last year and it never got this much attention. - cheers Joshua J. Kugler [EMAIL PROTECTED] 1/29/07 4:36 PM That's funny...when I go to a technical conference, I usually go for the conference, and couldn't care less if there is other stuff to do in the area during the off hours. j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com ( http://www.eeinternet.com/ ) PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 Ed Reed [EMAIL PROTECTED] 1/29/07 1:57 PM I just didn't enjoy the location. When it was in Orlando a few years ago, it was great. There were plenty of things to do and see; different places to eat every night. I had a really good time. Then the following year I went to Santa Clara and there was nothing to do. I went to the movies one night. Had dinner at Sizzler three times. I drove 45 minutes to find a place I could buy a shirt. The rest of the time I stayed in the hotel and watched crappy tv. If you folks want me to be away from my family and friends for five days you've gotta give me a reason to wanna go besides the great technical information. I didn't go to last years, I'm not going to this years and I probably won't go to any future ones held in Santa Clara. When I came home from the last one, my kids asked what I got them from my trip and I had nothing for them. It was just a boring place to go and I don't wanna go back. I'd just like to see it held someplace new every year. Thanks for replying to my comment Lenz Grimmer [EMAIL PROTECTED] 1/25/07 2:21 AM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ed, thank you for your message! On Thu, 18 Jan 2007, Ed Reed has filled out the MySQL Contact Form with a General MySQL Question: Can someone tell me you folks are going to hold all future User Conferences in Santa Clara? I would like to go this year but I didn't enjoy myself at the last one I went to in Santa Clara in '05 and I don't wanna go back. If you folks plan to hold all future conferences there I'd like to know so I can resign myself to the fact that it's never gonna change instead of hoping that it's gonna be somewhere else every year. To be honest, it's not entirely clear yet if we will change the location for upcoming events. But could you explain why you didn't enjoy yourself at the last one? How can we improve? Bye, LenZ - -- Lenz Grimmer [EMAIL PROTECTED] Community Relations Manager, EMEA MySQL GmbH, http://www.mysql.de/, Hamburg, Germany Visit the MySQL Forge at http://forge.mysql.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFFuISeSVDhKrJykfIRAsJxAJ9hLkjhA10B68OHpw97x6QHbSqjLACePQym m9lEE93nxdC+K//cQsL658Q= =W/8N -END PGP SIGNATURE-
Re: General MySQL Question: Ed Reed (CA, United States ofAmerica) Medium
The area by the Santa Clara convention center is pretty dead, but you can take the light rail to downtown San Jose and there is a pretty lively nightlife there, lots of interesting restaurants, The Tech Museum and other things depending on you interests. Also there are lots more interesting places to eat than sizzler within in 5 minute drive of the convention center. Perhaps what is needed is either a nice cheatsheet of what to do and where to go? Or perhaps some of the locals could volunteer to be ambassadors and take people with similar interests to local activities, restaurants or points of interest. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql question regarding distinct/group by...
Hi, dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 Try, select * from dog where fooID=1 group by fooID; - which retrieves the first instance; resulting in, 1,2,1 Thanks ViSolve DB Team - Original Message - From: bruce [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, January 04, 2007 6:07 AM Subject: mysql question regarding distinct/group by... hi... i've asked something similar before.. but it appears something is going wrong... so, back to basics... i have the following test tbl. dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 how can i do a distinct/group by select such that if i do a select on fooID=1, i'll only get '1,2,1', or '1,5,3', meaning that i don't get both of the items where fooId=1. 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: mysql question regarding distinct/group by...
SELECT * FROM Dog GROUP BY FooId HAVING FooId = 1; This should also work. On 1/5/07, ViSolve DB Team [EMAIL PROTECTED] wrote: Hi, dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 Try, select * from dog where fooID=1 group by fooID; - which retrieves the first instance; resulting in, 1,2,1 Thanks ViSolve DB Team - Original Message - From: bruce [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, January 04, 2007 6:07 AM Subject: mysql question regarding distinct/group by... hi... i've asked something similar before.. but it appears something is going wrong... so, back to basics... i have the following test tbl. dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 how can i do a distinct/group by select such that if i do a select on fooID=1, i'll only get '1,2,1', or '1,5,3', meaning that i don't get both of the items where fooId=1. 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]
mysql question regarding distinct/group by...
hi... i've asked something similar before.. but it appears something is going wrong... so, back to basics... i have the following test tbl. dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 how can i do a distinct/group by select such that if i do a select on fooID=1, i'll only get '1,2,1', or '1,5,3', meaning that i don't get both of the items where fooId=1. thanks... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql question regarding distinct/group by...
In the last episode (Jan 03), bruce said: i've asked something similar before.. but it appears something is going wrong... so, back to basics... i have the following test tbl. dog fooID int size int id int dog fooIDsizeid 1 2 1 2 5 2 1 5 3 if i do a query select * from dog where fooID='1'; i get 1,2,1 1,5,3 how can i do a distinct/group by select such that if i do a select on fooID=1, i'll only get '1,2,1', or '1,5,3', meaning that i don't get both of the items where fooId=1. How about just asking for the first matching record with LIMIT 1? -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Install mysql question
Hello. See: http://dev.mysql.com/doc/mysql/en/can-not-connect-to-server.html Dear there, I have some problems when installing mysql under rpm. Hope some people can give me help. I install MySQL-server-4.1.12-0.i386 package and MySQL--client--4.1.12-0.i386 package under root account. Under the root account, I can start the mysql and it seems working fine. However, when I change the root account to user account, it give me error report Can't connect to local MySQL server through the socket /var/lib/mysql/mysql.sock . But the mysql.sock file is already in this directory when I checked. I try a lot way to solve it, unfornately, it fails. Could some people give me some idea? I have to say I am just beginner. I am really appreciated any suggestions! Ying Sun [EMAIL PROTECTED] wrote: -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [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]
Install mysql question
Dear there, I have some problems when installing mysql under rpm. Hope some people can give me help. I install MySQL-server-4.1.12-0.i386 package and MySQL--client--4.1.12-0.i386 package under root account. Under the root account, I can start the mysql and it seems working fine. However, when I change the root account to user account, it give me error report Can't connect to local MySQL server through the socket /var/lib/mysql/mysql.sock . But the mysql.sock file is already in this directory when I checked. I try a lot way to solve it, unfornately, it fails. Could some people give me some idea? I have to say I am just beginner. I am really appreciated any suggestions! Best Ying
RE: Python related MySQL question
Look at db.use_result() and db.store_result() here : http://www.birgerblixt.com/doc/packages/python-mysql/MySQLdb-2.html#ss2. 2 Best Regards Mathias FATENE Hope that helps *This not an official mysql support answer -Original Message- From: Smelly Socks [mailto:[EMAIL PROTECTED] Sent: mardi 26 avril 2005 06:20 To: mysql@lists.mysql.com Subject: Re: Python related MySQL question Hi! I am porting a function library app I wrote in PHP to Python. At work they only use Python. I've researched how to connect to a MySql database using Python, and how to retrieve rows. However, I am wondering how to do the following: I can do this in Python = $da=MYSQL_QUERY(select * from prefs where user_name='$user_name' ); I can do this in Python = $peek=mysql_fetch_array($da); I cannot do the following: $title =$peek[4]; //title window $logic =$peek[5]; //logic window Can anyone shed light on how to get the pieces of the array and stick them into variables? Thanks very much! Cheers! -Warren - Original Message - From: Spenser [EMAIL PROTECTED] To: David Bailey [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Thursday, April 14, 2005 12:27 PM Subject: Re: book advice Check out MySQL Tutorial by Luke Welling (MySQL Press). It's easy to understand and not overwhelming. -- 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] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Python related MySQL question
Hi! I am porting a function library app I wrote in PHP to Python. At work they only use Python. I've researched how to connect to a MySql database using Python, and how to retrieve rows. However, I am wondering how to do the following: I can do this in Python = $da=MYSQL_QUERY(select * from prefs where user_name='$user_name' ); I can do this in Python = $peek=mysql_fetch_array($da); I cannot do the following: $title =$peek[4]; //title window $logic =$peek[5]; //logic window Can anyone shed light on how to get the pieces of the array and stick them into variables? Thanks very much! Cheers! -Warren - Original Message - From: Spenser [EMAIL PROTECTED] To: David Bailey [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Thursday, April 14, 2005 12:27 PM Subject: Re: book advice Check out MySQL Tutorial by Luke Welling (MySQL Press). It's easy to understand and not overwhelming. -- 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]
DBI mysql question.
Dear MySQL Developers and Enthusiasts, when I run these lines of code : my $T_NO = 12569; use DBI; my $dbh = DBI-connect(DBI:mysql:database=carr_search;192.168.0.1,user,password); my $q = CREATE TABLE IF NOT EXISTS CS_? ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYPE CHAR(1) ); my $sth = $dbh-prepare($q); $sth-execute($T_NO); from w/in a program I get: DBD:mysql::st execute failed: You have an error in your SQL syntax near '12569 ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYP' at line 2 at ./carr_s.pl line 36. However if I cut and paste the exact same code and make it it's own program then execute it, it works perfectly. Can anyone tell me what's happening and how I can fix it? Thanks, Richard -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: DBI mysql question.
Hey, The placeholders (?) are safely escaped by the DBI library -- your query that gets submitted to the server actually looks like: CREATE TABLE IF NOT EXISTS CS_ 12569 ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYPE CHAR(1) ) I think it puts the space in, but it might actually be quoting it. I would do something like: $dbh-do(sprintf(CREATE TABLE IF NOT EXISTS CS_%d ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYPE CHAR(1) ), $T_NO)); out. On Wed, 16 Mar 2005 10:10:39 -0800 (PST), Richard Reina [EMAIL PROTECTED] wrote: Dear MySQL Developers and Enthusiasts, when I run these lines of code : my $T_NO = 12569; use DBI; my $dbh = DBI-connect(DBI:mysql:database=carr_search;192.168.0.1,user,password); my $q = CREATE TABLE IF NOT EXISTS CS_? ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYPE CHAR(1) ); my $sth = $dbh-prepare($q); $sth-execute($T_NO); from w/in a program I get: DBD:mysql::st execute failed: You have an error in your SQL syntax near '12569 ( ID_NO MEDIUMINT, NAME VARCHAR(30), TYP' at line 2 at ./carr_s.pl line 36. However if I cut and paste the exact same code and make it it's own program then execute it, it works perfectly. Can anyone tell me what's happening and how I can fix it? Thanks, Richard -- 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]
[mysql] Question about the reference manual
Is the MySQL Reference Manual, by Widenius and Axmark (the one to which there is a link on the Documentation page of the mysql website, for sale by Barnes and Noble) the same reference manual that you can download? The PDF version has 1310 pages, the softcover book has 712 pages, and I'm not sure that they're the same. I like to have an actual book so that I can take it with me and study in places where I have to waste some time waiting. But I suspect the online manual is more up to date than the published book, and wanted to confirm whether that is true. rdo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: [mysql] Question about the reference manual
On Wed, Aug 04, 2004 at 02:46:50PM -0500, rdo mail list address wrote: Is the MySQL Reference Manual, by Widenius and Axmark (the one to which there is a link on the Documentation page of the mysql website, for sale by Barnes and Noble) the same reference manual that you can download? The PDF version has 1310 pages, the softcover book has 712 pages, and I'm not sure that they're the same. I like to have an actual book so that I can take it with me and study in places where I have to waste some time waiting. But I suspect the online manual is more up to date than the published book, and wanted to confirm whether that is true. The MySQL Reference Manual published by O'Reilly is the same reference manual as the website -- as it existed when it was published in June 2002. The manual has been updated quite extensively since then. Two new books have just been published under the MySQL Press imprint that are derived from the online manual. You can find more information about them at http://www.mysqlpress.com/ Jim Winstead MySQL AB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Quick mysql question
4.0.18 is the latest stable! On Tue, 2004-03-23 at 19:08, [EMAIL PROTECTED] wrote: Hi, A quick question, which is the most stable version of mysql to run on a very busy and commercial website(s)? 4.0 or is 4.1 stable enough? Thanks, -R.A -- |...| | _ _|Victor Medina M | |\ \ \| | _ \ / \ |Linux - Java - MySQL | | \ \ \ _| | |_) / _ \ |Dpto. Sistemas - Ferreteria EPA | | / / / |___| __/ ___ \ |[EMAIL PROTECTED] | |/_/_/|_|_| /_/ \_\|Tel: +58-241-8507325 - ext. 325 | ||Cel: +58-412-8859934 | ||geek by nature - linux by choice | |...|
Quick mysql question
Hi, A quick question, which is the most stable version of mysql to run on a very busy and commercial website(s)? 4.0 or is 4.1 stable enough? Thanks, -R.A -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Quick mysql question
4.1 seems stable enough, been running it since it was released. in production, busy, commercial, enterprise environment. plus it fixes some bugs in 4.0 and adds some (could be potentially) necessary functions Dan. On Tue, 23 Mar 2004 [EMAIL PROTECTED] wrote: Hi, A quick question, which is the most stable version of mysql to run on a very busy and commercial website(s)? 4.0 or is 4.1 stable enough? Thanks, -R.A -- 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: Quick mysql question
[EMAIL PROTECTED] wrote: Hi, A quick question, which is the most stable version of mysql to run on a very busy and commercial website(s)? 4.0 or is 4.1 stable enough? Thanks, -R.A 4.0 is a released and stable version. 4.1 is a developement version which is alpha, but quite stable :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Question
We are a developer of Point of Sale software and are launching a Linux based product shortly. We wanted to know if there were any plans for MySQL to support eSQL any time soon. Thanks. Regards, Blair M. Melton Vice President, Grocery and Merchandise Division Sweda Corporation (416) 246-5487
Php mysql question please help
I just started working with mysql and I'm very novice Created a simple database and programmed php to connect as follows... ?php include (webvars.inc); // webvars file is this //?php$user = ???;$hostname = ???;$password = pass; //$db=cs? $link= mysql_connect($hostname,$user,$password)or die (_something is whong); mysql_select_db($db,$link); $query =SELECT * FROM projects; $result = mysql_query($query); $array = mysql_fetch_array($result); $usercount = mysql_num_rows($result); mysql_close($link); ? Question 1 I put the files created from mysql(MYI ,MYD,frm) in the correct directory at my site Is this correct or do they need some kind of compilling? Question 2 How do I Grant my host name and user name I'm comfused..It gives me an error message Can't connect because of host and user mistake.. Thanks Aaron
Re: Can't connect to local MySQL question
I forwarded your mail to the mysql list so that everyone who cares knows what is going. Bill Hernandez wrote: The error log shows: 030810 14:52:48 mysqld started 030810 14:52:49 InnoDB: Started 030810 14:52:49 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 030810 14:52:49 Aborting Ah that sounds familiar. :( 1) If you don't know what InnoDB is, comment all the lines out that have innodb options in your /etc/my.cnf 2) InnoDB provides transactions and referential integrity. Neat things that you probaply not know about, yet. 3) I bet the file /usr/local/mysql/data/mysql/mysql.host exists but InnoDB isn't allowed to see it by wrong directory/file permissions of your file system (not MySQL !) I've bought several books on php/mysql and they all get right into the programming aspects Thats the point of PHP. They have to suppose you allready know to handle the DBMS. www.php.net www.devshed.net www.php.net Don't miss the PEAR extensions. -- pear.php.net Start with PHP's mysql standard functions to get a basic understanding. When you think you got that move up to the PEAR-DB classes. http://pear.php.net/manual/en/package.database.php and what I probably need to look for is a book that talks about the architecture. well, not really. Knowledge on dead trees is only good provided you have the time or motivation to actually read the book and of course some are crap anyway. Then there are those which fill 1000 pages with more or less important stuff but your specific problem is no where to be found. I hate it especially to read a chapter that stops right before the point where I need further info stating that from here it's too specific for this book. =8-O I bought lots of books which I should have read completely but just couldn't get the hang of. Buy it, take it home, put it on shelf, feel good that now all problems can come ... not quite. 1) Look in the (searchable!) online docu. Some with readers's comments. 2) Look at google. Real issues tend show up elsewhere and probaply are solved and documented allready. 3) Ask on a list. 4) Books ? Usually decorative at best though there are good ones, too. I can see that the first thing I really need to do, is get a good understanding of is all the pieces that make mysql work, what they do, how when they get created. What tools to use, preferably GUI tools. that can't hurt ;) I like phpMyAdmin as maintenance client. mysql and mysqladmin in texmode ain't that bad either when you know what's going on. Then there is mysqlcc from mysql.com. GUI but I don't know if they build it for apples. ...and I have no clue why mysqld is unhappy about Table 'mysql.host' doesn't exist. Where in the install, etc, process was it supposed to get created, and by which piece? /usr/local/mysql/scripts/mysql_install_db Your problem are the permissions not the lack of the file. I think I need to take three steps back, and figure out where the beginning is? Thanks for the help... no problem ... Andreas Germany -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
[Fwd: Re: Can't connect to local MySQL question]
---BeginMessage--- On 8/9/03 11:20 PM, Andreas [EMAIL PROTECTED] wrote: Andreas, Thanks for the help... The error log shows: 030810 14:52:48 mysqld started 030810 14:52:49 InnoDB: Started 030810 14:52:49 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 030810 14:52:49 Aborting 030810 14:52:49 InnoDB: Starting shutdown... 030810 14:52:51 InnoDB: Shutdown completed 030810 14:52:51 /usr/local/mysql/bin/mysqld: Shutdown Complete 030810 14:52:51 mysqld ended I've bought several books on php/mysql and they all get right into the programming aspects, and what I probably need to look for is a book that talks about the architecture. I can see that the first thing I really need to do, is get a good understanding of is all the pieces that make mysql work, what they do, how when they get created. What tools to use, preferably GUI tools. I followed the instructions on the install, and re-installed, the deleted everything installed again. ...and I have no clue why mysqld is unhappy about Table 'mysql.host' doesn't exist. Where in the install, etc, process was it supposed to get created, and by which piece? I think I need to take three steps back, and figure out where the beginning is? Thanks for the help... Bill Hernandez Plano, Texas BTW, your comment about mysqld being a daemon, and mysql is the client really helped, puts things in perspective. Sort of client - server which I can relate to... Bill Hernandez wrote: I followed the install instructions at http://entropy.ch , and was able to get mySql php installed on my G4 - (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Did the server start and could you connect ? Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. 1) Have the mysql daemon running 2) connect with a client [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended there is an error.log in the data directory. Look there for mysql's complaints. HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) no You are mixing up the server and client process. mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases. You'll select one of them later when you connect with the client. mysql -- no d (=daemon) is the textmode client that comes with the mysql package. [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Without running server-process there is no socket to connect to. start by looking at the err-file in the data-dir. You can run mysqld_save without the to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save. I had a hard time getting this kind of error. One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often. mysqld started and died at once again. If mc produces this effect then perhaps other filemanaging tools do, too. Use pure bash or xterm. Better yet, install mysql as a service to have it started at boot time. ---End Message--- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Can't connect to local MySQL question
Hi, I've been writing software on the mac since 1987, but am brand new at unix/php/mysql, and that's where I'm headed so I'm reading everything I can get my hands on, but like anything else there's going to be a learning curve, that having been said... I followed the install instructions at http://entropy.ch , and was able to get mySql php installed on my G4 - (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. Could someone take a look at the syntax below and see if you could spot what I am doing wrong? Thank you very much... Bill Hernandez Last login: Sat Aug 9 20:00:07 on console Welcome to Darwin! [Home:~] justMe% su Password: [Home:/Users/justMe] justMe# cd /usr/local/mysql [Home:/usr/local/mysql] justMe# chown -R mysql data/ [Home:/usr/local/mysql] justMe# echo [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/usr/local] justMe# cd / [Home:/] justMe# /usr/local/mysql/bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/] justMe# mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/] justMe# -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't connect to local MySQL question
Andreas wrote: Bill Hernandez wrote: I followed the install instructions at http://entropy.ch , and was able to get mySql php installed on my G4 - (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Did the server start and could you connect ? Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. 1) Have the mysql daemon running 2) connect with a client [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended there is an error.log in the data directory. Look there for mysql's complaints. HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) no You are mixing up the server and client process. mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases. You'll select one of them later when you connect with the client. mysql -- no d (=daemon) is the textmode client that comes with the mysql package. [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Without running server-process there is no socket to connect to. start by looking at the err-file in the data-dir. You can run mysqld_save without the to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save. I think it is mysqld_safe! I had a hard time getting this kind of error. One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often. mysqld started and died at once again. If mc produces this effect then perhaps other filemanaging tools do, too. Use pure bash or xterm. Better yet, install mysql as a service to have it started at boot time. -- Peter K. Aganyo Eternal Designs Inc., +1(617)344-8023 (fax voicemail)
Re: Can't connect to local MySQL question
Bill Hernandez wrote: I followed the install instructions at http://entropy.ch , and was able to get mySql php installed on my G4 - (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Did the server start and could you connect ? Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. 1) Have the mysql daemon running 2) connect with a client [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended there is an error.log in the data directory. Look there for mysql's complaints. HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) no You are mixing up the server and client process. mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases. You'll select one of them later when you connect with the client. mysql -- no d (=daemon) is the textmode client that comes with the mysql package. [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Without running server-process there is no socket to connect to. start by looking at the err-file in the data-dir. You can run mysqld_save without the to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save. I had a hard time getting this kind of error. One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often. mysqld started and died at once again. If mc produces this effect then perhaps other filemanaging tools do, too. Use pure bash or xterm. Better yet, install mysql as a service to have it started at boot time. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Perl/mysql question
Has anyone written a perl script to get records from another database and write it to a file on mysql's LOAD DATA INFILE format? I just need some pointers in perl so a LOAD DATA INFILE will be read correctly. For example, a perl script: Select * from emp from a Progress database Will write to a text file called emp.txt in the LOAD DATA INFILE format, Then, I can to a direct LOAD DATA INFILE into my mysql database. I tried doing direct select/inserts in perl but found dumping to a text file and doing a LOAD DATA to be MUCH faster. Am I missing something here? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Perl/mysql question
Has anyone written a perl script to get records from another database and write it to a file on mysql's LOAD DATA INFILE format? I just need some pointers in perl so a LOAD DATA INFILE will be read correctly. You might want to check out Perl's DBI module at search.cpan.org I use that all the time to interact with mysql. Simple quick and just as sexxy as mysql itself! HTH DMuey For example, a perl script: Select * from emp from a Progress database Will write to a text file called emp.txt in the LOAD DATA INFILE format, Then, I can to a direct LOAD DATA INFILE into my mysql database. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Perl/mysql question
Howell, Scott wrote: Has anyone written a perl script to get records from another database and write it to a file on mysql's LOAD DATA INFILE format? I just need some pointers in perl so a LOAD DATA INFILE will be read correctly. For example, a perl script: Select * from emp from a Progress database Will write to a text file called emp.txt in the LOAD DATA INFILE format, Then, I can to a direct LOAD DATA INFILE into my mysql database. I tried doing direct select/inserts in perl but found dumping to a text file and doing a LOAD DATA to be MUCH faster. Am I missing something here? Download data from mysql to pipe delimited text file; whole table. SELECT * FROM table1 INTO OUTFILE 'c:/test.txt' FIELDS TERMINATED BY |; Same download with perl/cgi my $statement = 'SELECT * FROM table1 INTO OUTFILE \'C:/test.txt\' FIELDS TERMINATED BY |'; $dbh-do($statement) or die tilt\n; Upload data from pipe delimited text file. Loads whole table. LOAD DATA LOCAL INFILE [path with front slashes] filename.txt INTO TABLE tablename FIELDS TERMINATED BY |; Note that some service providers don't like this and won't permit it. -- Joel Fentintel: 760-749-8863FAX: 760-749-8864 email: [EMAIL PROTECTED] Biz: http://fentin.com Personal: http://fentin.com/me/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Perl/mysql question
Hi all, I am using DBI and DBD::mysql to connect to a MySQL database from perl and I would like to get the execution time period after a query, like MySQL standard client shows. Sometimes when I work in the standard console client it tells me that there are x wornings. How can I see which are those warnings? Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Howell, Scott [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 6:38 PM Subject: Perl/mysql question Has anyone written a perl script to get records from another database and write it to a file on mysql's LOAD DATA INFILE format? I just need some pointers in perl so a LOAD DATA INFILE will be read correctly. For example, a perl script: Select * from emp from a Progress database Will write to a text file called emp.txt in the LOAD DATA INFILE format, Then, I can to a direct LOAD DATA INFILE into my mysql database. I tried doing direct select/inserts in perl but found dumping to a text file and doing a LOAD DATA to be MUCH faster. Am I missing something here? -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 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: [MYSQL] Question about 'SHOW PROCESSLIST' output columns
PAUL MENARD [EMAIL PROTECTED] wrote: I'm having an intermittent problem with a MySQL server that I have running on a Windows 2000 Advance server systems. This issue occurs every few days depending on the load of the system. Here are the details. MySQL version 3.23.42-nt (I know I need to upgrade. Soon). Machine: Windows 2000 Advanced Server 2G memory 36G disk space. I have a Web page that allows my operators to monitor various process tasks on this server. Sometimes they receive an error that PHP cannot connect to MySQL. If this happens during the day they call me. I log into the server and bring up the WinMySQLadmin 3.1 client and click on the 'Process' tab. There are a few (maybe 250 attached processes). I know there are many machines connecting to this database to feed updates from enterprise applications. So I bumped up the 'max_connections' limit to 1000. This just seems to delay the limit and the phone call. My question is in looking at the output form the 'Process' tab I see the columns 'Command' and 'Time'. In all of the rows for 'Command' the value is 90% 'Sleep'. This would tell me I have some processes out there that are not dis-connecting (right?). In the 'Time' column is see numbers ranging from 150 to 1000+. I'm guessing this is the time the connection is idle (correct?). What I would like to do is define my parameters so that these dead processes will be disconnected by MySQL after a shorter time but not sure which variable to change. Advice? You can decrease value of wait_timout variable: http://www.mysql.com/doc/en/SHOW_VARIABLES.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [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]
Re: update to 4.0 mySQL question
# [EMAIL PROTECTED] / 2003-06-23 11:11:28 -0400: I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? Looks like you have either not upgraded you client (server puts the socket in /var/lib/mysql, but the client expects it in /tmp), and/or you have conflicting definitions my my.cnf file(s). -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: update to 4.0 mySQL question
Susan Ator [EMAIL PROTECTED] wrote: I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? Use --socket option of mysqld: http://www.mysql.com/doc/en/Command-line_options.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]
[MYSQL] Question about 'SHOW PROCESSLIST' output columns
Hello All, I'm having an intermittent problem with a MySQL server that I have running on a Windows 2000 Advance server systems. This issue occurs every few days depending on the load of the system. Here are the details. MySQL version 3.23.42-nt (I know I need to upgrade. Soon). Machine: Windows 2000 Advanced Server 2G memory 36G disk space. I have a Web page that allows my operators to monitor various process tasks on this server. Sometimes they receive an error that PHP cannot connect to MySQL. If this happens during the day they call me. I log into the server and bring up the WinMySQLadmin 3.1 client and click on the 'Process' tab. There are a few (maybe 250 attached processes). I know there are many machines connecting to this database to feed updates from enterprise applications. So I bumped up the 'max_connections' limit to 1000. This just seems to delay the limit and the phone call. My question is in looking at the output form the 'Process' tab I see the columns 'Command' and 'Time'. In all of the rows for 'Command' the value is 90% 'Sleep'. This would tell me I have some processes out there that are not dis-connecting (right?). In the 'Time' column is see numbers ranging from 150 to 1000+. I'm guessing this is the time the connection is idle (correct?). What I would like to do is define my parameters so that these dead processes will be disconnected by MySQL after a shorter time but not sure which variable to change. Advice? Paul
update to 4.0 mySQL question
I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Colonel in Cuba with MySQL question
I inadvertantly deleted the colonel's question, which I believe concerned winmysqladmin. Please give us more info. You should be able to see your databse(s) under the database tab. David - 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
PHP / MYSQL Question
Not sure if this can be done with just a MYSQL Query or if it needs to be done in conjunction with a PHP script. What I am trying to do is build a dynamic FAQ section with PHP. Here are the two tables Topics === TopicID TopicTitle TopicDESC FAQS === FAQID Question Answer Topic I'm trying to get it to display like this Topic1 Question1 Question2 Question3 Question4 Topic2 Question1 Question2 So each topic would be listed with its set of questions below it. Any help would be appreciated. Mike Walth CinoFusion - 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
perl dbi and mysql question
i am using perl dbi with dbd::mysql. i know that using the dbi function, $dbh-tables (), will list all the tables in a database. is there a function that will show all the databases on a server? thanks, shon - 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: perl dbi and mysql question
eureka! i found it! @dbs = $dbh-func('_ListDBs'); -Original Message- From: Shon Stephens [mailto:sstephens;corp.goamerica.net] Sent: Friday, November 08, 2002 9:45 AM To: '[EMAIL PROTECTED]' Subject: perl dbi and mysql question i am using perl dbi with dbd::mysql. i know that using the dbi function, $dbh-tables (), will list all the tables in a database. is there a function that will show all the databases on a server? thanks, shon - 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
Re: perl dbi and mysql question
No clue of dbi/dbd but the query SHOW DATABASES does what it tells. STIBS - Original Message - From: Shon Stephens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 3:44 PM Subject: perl dbi and mysql question i am using perl dbi with dbd::mysql. i know that using the dbi function, $dbh-tables (), will list all the tables in a database. is there a function that will show all the databases on a server? thanks, shon - 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
RE: perl dbi and mysql question
Of course, you could have also used: $stmt = $db-prepare(show databases); Peter ^_^ -Original Message- From: Shon Stephens [mailto:sstephens;corp.goamerica.net] Sent: Friday, November 08, 2002 9:50 AM To: Shon Stephens; '[EMAIL PROTECTED]' Subject: RE: perl dbi and mysql question eureka! i found it! @dbs = $dbh-func('_ListDBs'); -Original Message- From: Shon Stephens [mailto:sstephens;corp.goamerica.net] Sent: Friday, November 08, 2002 9:45 AM To: '[EMAIL PROTECTED]' Subject: perl dbi and mysql question i am using perl dbi with dbd::mysql. i know that using the dbi function, $dbh-tables (), will list all the tables in a database. is there a function that will show all the databases on a server? thanks, shon - 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 - 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: perl dbi and mysql question
yeah, but i was looking for a function. mostly just to see if a matching function to dbh-tables() existed. -Original Message- From: Grigor, Peter [mailto:pgrigor;aseedge.com] Sent: Friday, November 08, 2002 10:07 AM To: 'Shon Stephens'; '[EMAIL PROTECTED]' Subject: RE: perl dbi and mysql question Of course, you could have also used: $stmt = $db-prepare(show databases); Peter ^_^ -Original Message- From: Shon Stephens [mailto:sstephens;corp.goamerica.net] Sent: Friday, November 08, 2002 9:50 AM To: Shon Stephens; '[EMAIL PROTECTED]' Subject: RE: perl dbi and mysql question eureka! i found it! @dbs = $dbh-func('_ListDBs'); -Original Message- From: Shon Stephens [mailto:sstephens;corp.goamerica.net] Sent: Friday, November 08, 2002 9:45 AM To: '[EMAIL PROTECTED]' Subject: perl dbi and mysql question i am using perl dbi with dbd::mysql. i know that using the dbi function, $dbh-tables (), will list all the tables in a database. is there a function that will show all the databases on a server? thanks, shon - 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 - 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
Another Defining Relationships in MySQL Question
In MS Access you define relationships between Key ID fields by dragging a line on the screen from the parent table to the child table. So, if you are enforcing referential integrity you can not delete data that is referred to by another table or mess up the basic db structure... (think I have this about right :) When you first create a db in MySQL... how do you tell MySQL which Key field in table A is related to a field in table B? Thanks for any help - tmb __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - 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: Another Defining Relationships in MySQL Question
tmb wrote: In MS Access you define relationships between Key ID fields by dragging a line on the screen from the parent table to the child table. Read up on referential integrity and InnoDB tables in the online docs at http://www.mysql.com/doc/en -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - 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: a mysql question
I think you need to give us the SQL you are using to do the search - we'll ba ble to see what your are trying to do better Alan -Original Message- From: µÑ ¶Ì [mailto:[EMAIL PROTECTED]] Sent: Thursday, 17 October 2002 15:37 To: [EMAIL PROTECTED] Subject: a mysql question I'm a chinese software engineer, and I has use mysql for three years ago.Now,I get a matter from it. recently,I'm deal big data use mysql first.every table's data is one million,so user search the data will use long time.now ,if some user search one table togeter,the table is dead , and I find the connection to the mysql cann't close,my God,I only restart it. my develop language is JAVA.But I can't think the error is in JAVA code.my question is wheather mysql can't support a lot of connection search one table together? I want get a help or an advance for you ,thanks. _ Do You Yahoo!? ÐÂÏʵ½µ×,ÓéÀÖµ½¼Ò - ÑÅ»¢ÍƳöÃâ·ÑÓéÀÖµç×ÓÖܱ¨! http://cn.ent.yahoo.com/newsletter/index.html - 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
Re: a mysql question
Pada Thu, 17 Oct 2002 13:36:58 +0800 (CST) µÑ ¶Ì [EMAIL PROTECTED] menulis: I'm a chinese software engineer, and I has use mysql for three years ago.Now,I get a matter from it. recently,I'm deal big data use mysql first.every table's data is one million,so user search the data will use long time.now ,if some user search one table togeter,the table is dead , and I find the connection to the mysql cann't close,my God,I only restart it. my develop language is JAVA.But I can't think the error is in JAVA code.my question is wheather mysql can't support a lot of connection search one table together? I want get a help or an advance for you ,thanks. Please create index on your table and it depends on your queries ... :D It will improve your query performance. My server is now have more than 2 million records per table and a lot of connections, it's really depend on your table design and also my.cnf configuration. -- Dicky Wahyu Purnomo - System Administrator PT FIRSTWAP: Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790) Phone: +62 21 79199577 - HP: +62 8158787286 - Web: http://1rstwap.com - 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
a mysql question
I'm a chinese software engineer, and I has use mysql for three years ago.Now,I get a matter from it. recently,I'm deal big data use mysql first.every table's data is one million,so user search the data will use long time.now ,if some user search one table togeter,the table is dead , and I find the connection to the mysql cann't close,my God,I only restart it. my develop language is JAVA.But I can't think the error is in JAVA code.my question is wheather mysql can't support a lot of connection search one table together? I want get a help or an advance for you ,thanks. _ Do You Yahoo!? ÐÂÏʵ½µ×,ÓéÀÖµ½¼Ò - ÑÅ»¢ÍƳöÃâ·ÑÓéÀÖµç×ÓÖܱ¨! http://cn.ent.yahoo.com/newsletter/index.html - 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: a mysql question
Sorry, but it is hard to understand what you are actually asking, but I'll try. If you are returning too large resultset, it is possibly a JDBC driver problem, since it will retrieve all into Java objects, which could take forever. If you know your SELECT statement, just issue it in the mysql client, and you will know the number of records returned as well as how long it takes. But I think you are trying to say something about multi-threading on connections. If I am not mistaken, you are not allowed to re-use the same connection with more than one query at a time. You either need an exclusion mechanism or a connection pool to distribute available connections among users, i.e. different threads. Niclas On Thursday 17 October 2002 13:36, µÑ ¶Ì wrote: I'm a chinese software engineer, and I has use mysql for three years ago.Now,I get a matter from it. recently,I'm deal big data use mysql first.every table's data is one million,so user search the data will use long time.now ,if some user search one table togeter,the table is dead , and I find the connection to the mysql cann't close,my God,I only restart it. my develop language is JAVA.But I can't think the error is in JAVA code.my question is wheather mysql can't support a lot of connection search one table together? I want get a help or an advance for you ,thanks. _ Do You Yahoo!? ÐÂÏʵ½µ×,ÓéÀÖµ½¼Ò - ÑÅ»¢ÍƳöÃâ·ÑÓéÀÖµç×ÓÖܱ¨! http://cn.ent.yahoo.com/newsletter/index.html - 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
Re: MySQL Question
* David M. Gonzalez Salinas Does anybody knoy what is equivalent stmt in MySQL? select * from table1 where col1 in (select col1 from table2) This is called a subselect, and it is explained in the manual: URL: http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html -- Roger - 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: MySQL Question
David, Tuesday, October 08, 2002, 2:01:46 AM, you wrote: DMGS Does anybody knoy what is equivalent stmt in MySQL? select * from table1 DMGS where col1 in (select col1 from table2) You can re-write without subselects: http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.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 - 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
MySQL Question
Hi everybody... Does anybody knoy what is equivalent stmt in MySQL? select * from table1 where col1 in (select col1 from table2) thanks in advance. David. - 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
phpMyAdmin/MySQL Question
Maybe someone else can come up with an answer for me on this question. I am getting the following error when I try to run my index.php file. I think I have configured it correctly, but obviously I haven't. And my host basically told to go shove it. Welcome to phpMyAdmin 2.3.1-rc1 Error MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Does anyone have any suggestions on this one? My config file looks like this in the areas I think I may have screwed up: $cfg['PmaAbsoluteUri'] = 'http://www.iaacc.org/phpMyAdmin/'; $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE; $cfg['PmaNoRelation_DisableWarning'] = FALSE; /** * Server(s) configuration */ $i = 0; $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket']= ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = '***'; $cfg['Servers'][$i]['password'] = '***'; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['pmadb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info']= ''; $cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; $cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); I have my login and password entered into the user/password area. Also, the actually database is online at mysql.iaacc.org and that might be different. If anyone can help, I would REALLY appreciate it. Thanks -Bill William Easton Creative Media Group The University of Iowa Room 1185 Westlawn Iowa City, IA 52242 319/353-3022 voice 319/335-9127 fax [EMAIL PROTECTED] http://www.medicine.uiowa.edu/creative http://telemed.medicine.uiowa.edu Notice: This e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. - 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: phpMyAdmin/MySQL Question
I believe you need to change the socket to the location in your /etc/my.cnf file. I usually add both sections in it just to kep things straight. [client] socket=path-for-socket-file [mysqld] socket=path-for-socket-file I used /ldata/mysql/tmp/mysql.sock my.cnf isn't automatically there so you may have to create it. then change $cfg['Servers'][$i]['socket']= ''; to $cfg['Servers'][$i]['socket']= 'path-used-in-my.cnf'; I am probably wrong, but its something that you can try without any danger of screwing up everything. If it doesn't work, simply remove the socket information and lines from the my.cnf file. Jason -Original Message- From: Easton, William [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 12:55 PM To: '[EMAIL PROTECTED]' Subject: phpMyAdmin/MySQL Question Maybe someone else can come up with an answer for me on this question. I am getting the following error when I try to run my index.php file. I think I have configured it correctly, but obviously I haven't. And my host basically told to go shove it. Welcome to phpMyAdmin 2.3.1-rc1 Error MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Does anyone have any suggestions on this one? My config file looks like this in the areas I think I may have screwed up: $cfg['PmaAbsoluteUri'] = 'http://www.iaacc.org/phpMyAdmin/'; $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE; $cfg['PmaNoRelation_DisableWarning'] = FALSE; /** * Server(s) configuration */ $i = 0; $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket']= ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = '***'; $cfg['Servers'][$i]['password'] = '***'; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['pmadb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info']= ''; $cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; $cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); I have my login and password entered into the user/password area. Also, the actually database is online at mysql.iaacc.org and that might be different. If anyone can help, I would REALLY appreciate it. Thanks -Bill William Easton Creative Media Group The University of Iowa Room 1185 Westlawn Iowa City, IA 52242 319/353-3022 voice 319/335-9127 fax [EMAIL PROTECTED] http://www.medicine.uiowa.edu/creative http://telemed.medicine.uiowa.edu Notice: This e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. - 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
RE: phpMyAdmin/MySQL Question
Yes, please, someone please tell how that mysql.sock file is working. I get the same general thing as well when I try to connect using just mysqladmin. Don B. -Original Message- From: Easton, William [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 10:55 AM To: '' Subject: phpMyAdmin/MySQL Question Maybe someone else can come up with an answer for me on this question. I am getting the following error when I try to run my index.php file. I think I have configured it correctly, but obviously I haven't. And my host basically told to go shove it. Welcome to phpMyAdmin 2.3.1-rc1 Error MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Does anyone have any suggestions on this one? My config file looks like this in the areas I think I may have screwed up: $cfg['PmaAbsoluteUri'] = 'http://www.iaacc.org/phpMyAdmin/'; $cfg['PmaAbsoluteUri_DisableWarning'] = FALSE; $cfg['PmaNoRelation_DisableWarning'] = FALSE; /** * Server(s) configuration */ $i = 0; $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket']= ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = '***'; $cfg['Servers'][$i]['password'] = '***'; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['pmadb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info']= ''; $cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; $cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); I have my login and password entered into the user/password area. Also, the actually database is online at mysql.iaacc.org and that might be different. If anyone can help, I would REALLY appreciate it. Thanks -Bill William Easton Creative Media Group The University of Iowa Room 1185 Westlawn Iowa City, IA 52242 319/353-3022 voice 319/335-9127 fax [EMAIL PROTECTED] http://www.medicine.uiowa.edu/creative http://telemed.medicine.uiowa.edu Notice: This e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. - 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
Multiple concurrent MySQL question?
I desire to configure MySQL in such a way that it will permit me to have two different PHP/MySQL e-commerce applications running concurrently on my development system. The table names and table structure are the same on both applications(and databases). I have received a SQL backup from the new client and would just like to be able to restore it to a directory and start up another copy of MySQL and point it to the new location. I know that I could create two different databases to accomplish what I desire however, I would have to change all of the security tables for the new database. What are your suggestions to solve this issue? Thank You Paul - 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: Multiple concurrent MySQL question?
Paul, You need to run another server on a different port with a different socket path. See http://www.mysql.com/doc/en/Multiple_servers.html And http://www.mysql.com/doc/en/mysqld_multi.html to manage multiple MySQL servers. Cheers, Andrew -Original Message- From: Paul Maine [mailto:[EMAIL PROTECTED]] Sent: Sunday, 22 September 2002 12:26 To: MySQL MySQL Subject: Multiple concurrent MySQL question? I desire to configure MySQL in such a way that it will permit me to have two different PHP/MySQL e-commerce applications running concurrently on my development system. The table names and table structure are the same on both applications(and databases). I have received a SQL backup from the new client and would just like to be able to restore it to a directory and start up another copy of MySQL and point it to the new location. I know that I could create two different databases to accomplish what I desire however, I would have to change all of the security tables for the new database. What are your suggestions to solve this issue? Thank You Paul - 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
MySQL Question
I have to do an insert and need to nest a select inside. I have tons of documentation on a very simple version of this, however my requirements are one step beyond that. Here is what I'd like to do in MySQL: insert into table1 (column1, column2) values (select column1a from table2 where [something], valueFromMemory) If you'll notice, I want one column from a select and one column outside the select. Is this possible in MySQL? All the documentation I've read about MySQL says it can't be done. Thank you in advance! Mark - 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: MySQL Question
From my experince this is not possible. Is there any reason why you can not simply do two inserts following each other? INSERT INTO table1(column1) SELECT column1a FROM table2 WHERE [something] INSERT INTO table1(column2) VALUES(valueFromMemory) (as if you didnt know that already) =D There should be no reason why you couldnt do this as there is nothing that ties the two columns together (that I can see here). Maybe explain a bit more and we might be able to give you more info. -Nick I have to do an insert and need to nest a select inside. I have tons of documentation on a very simple version of this, however my requirements are one step beyond that. Here is what I'd like to do in MySQL: insert into table1 (column1, column2) values (select column1a from table2 where [something], valueFromMemory) If you'll notice, I want one column from a select and one column outside the select. Is this possible in MySQL? All the documentation I've read about MySQL says it can't be done. Thank you in advance! Mark - 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
Re: MySQL Question
At 17:16 -0700 9/10/02, Mark S Lowe wrote: I have to do an insert and need to nest a select inside. I have tons of documentation on a very simple version of this, however my requirements are one step beyond that. Here is what I'd like to do in MySQL: insert into table1 (column1, column2) values (select column1a from table2 where [something], valueFromMemory) If you'll notice, I want one column from a select and one column outside the select. Is this possible in MySQL? All the documentation I've read about MySQL says it can't be done. It depends. What is the second value and where does it come from? If it's some expression that you can calculate on the fly, there's no reason it can't be done. Thank you in advance! Mark - 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: MySQL Question
The optimization is understandable but I'm not sure how much it would affect it if you did the select outside the insert statment vs inside. Either way you are selecting the same thing but I dont know which way is better. Well just playing around with it for a bit I think I found something. The value from memory is a variable of some sort right? I dont know what language you are using so I'm not sure what it will hold. Anyways you could do something like the following: INSERT INTO table1(col1, col2) SELECT table2.col1a, variablehere FROM table2 WHERE [blah]; This will work becuase if you do a SELECT 5 you get 5 back. So if you do it with SELECT variable(aka some literial) you will get the variable(literial) back and you will have two cols to match your table1(col1, col2). HTH -Nick Sorry...yes...both columns have a NOT NULL constraint which makes inserting a blank a problem. My only other option is to do the SELECT first, then push the result into the INSERT with the other memory only variable. I'm doing this for a system that will undergo high volumes, and want to do what I can to optimize the number of individual selects. I'm probably going to have to do the alternate technique regardless. =\ On Tuesday, September 10, 2002, at 05:23 PM, Nicholas Stuart wrote: From my experince this is not possible. Is there any reason why you can not simply do two inserts following each other? INSERT INTO table1(column1) SELECT column1a FROM table2 WHERE [something] INSERT INTO table1(column2) VALUES(valueFromMemory) (as if you didnt know that already) =D There should be no reason why you couldnt do this as there is nothing that ties the two columns together (that I can see here). Maybe explain a bit more and we might be able to give you more info. -Nick I have to do an insert and need to nest a select inside. I have tons of documentation on a very simple version of this, however my requirements are one step beyond that. Here is what I'd like to do in MySQL: insert into table1 (column1, column2) values (select column1a from table2 where [something], valueFromMemory) If you'll notice, I want one column from a select and one column outside the select. Is this possible in MySQL? All the documentation I've read about MySQL says it can't be done. Thank you in advance! Mark - 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
MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql
EXPLANATION: here's the pertinent piece of my sql create statement: ID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID)); i have used this create statement numerous times without this problem. in the past, let's say i inserted 3 entries: A, B, and C. their IDs were 1,2, and 3. then i delete C from the database. when i then insert D its ID is 4. leaving 1,2, and 4 in the database. seems like this is safe and as it should be. all this morning, using the above example with a deviation...after i delete C and then insert D...D's ID is 3. if i delete B and C, then insert D and E...their ID's are 2 and 3. i was under the impression that once an ID had been used (in auto increment and as primary) it was gone. must i also make the ID unique? i can see why a primary key might need to be not UNIQUE (for concatenation of entries...etc), but i don't think i've done it iN the past (when it has incremented correctly). thanks ahead of time. query sql for the filter. jason wesley upton - 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
MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql
EXPLANATION: here's the pertinent piece of my MySQL create statement: ID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID)); i have used this create statement numerous times without this problem. in the past, let's say i inserted 3 entries: A, B, and C. their IDs were 1,2, and 3. then i delete C from the database. when i then insert D its ID is 4. leaving 1,2, and 4 in the database. seems like this is safe and as it should be. all this morning, using the above example with a deviation...after i delete C and then insert D...D's ID is 3. if i delete B and C, then insert D and E...their ID's are 2 and 3. i was under the impression that once an ID had been used (in auto increment and as primary) it was gone. must i also make the ID unique? i can see why a primary key might need to be not UNIQUE (for concatenation of entries...etc), but i don't think i've done it iN the past (when it has incremented correctly). thanks ahead of time. jason wesley upton a dropped query fancy table opens mysql queries from an sql integer with some happy pants that'll join unless union = a less enthusiastic return from the VARCHAR pleasant. - for the spam filter that hates my guts. - 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: MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql
That is a difference in the behavior of isam and myisam tables. jason wesley upton wrote: EXPLANATION: here's the pertinent piece of my sql create statement: ID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID)); i have used this create statement numerous times without this problem. in the past, let's say i inserted 3 entries: A, B, and C. their IDs were 1,2, and 3. then i delete C from the database. when i then insert D its ID is 4. leaving 1,2, and 4 in the database. seems like this is safe and as it should be. all this morning, using the above example with a deviation...after i delete C and then insert D...D's ID is 3. if i delete B and C, then insert D and E...their ID's are 2 and 3. i was under the impression that once an ID had been used (in auto increment and as primary) it was gone. must i also make the ID unique? i can see why a primary key might need to be not UNIQUE (for concatenation of entries...etc), but i don't think i've done it iN the past (when it has incremented correctly). thanks ahead of time. query sql for the filter. jason wesley upton - 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
Re: MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql
On Thu, 27 Jun 2002, jason wesley upton wrote: Date: Thu, 27 Jun 2002 14:05:34 -0500 From: jason wesley upton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: MySQL Question involving AUTO INCREMENT and PRIMARY IDs. - sql EXPLANATION: here's the pertinent piece of my sql create statement: ID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID)); i have used this create statement numerous times without this problem. in the past, let's say i inserted 3 entries: A, B, and C. their IDs were 1,2, and 3. then i delete C from the database. when i then insert D its ID is 4. leaving 1,2, and 4 in the database. seems like this is safe and as it should be. all this morning, using the above example with a deviation...after i delete C and then insert D...D's ID is 3. if i delete B and C, then insert D and E...their ID's are 2 and 3. i was under the impression that once an ID had been used (in auto increment and as primary) it was gone. must i also make the ID unique? i can see why a primary key might need to be not UNIQUE (for concatenation of entries...etc), but i don't think i've done it iN the past (when it has incremented correctly). Depends a bit on table type: ISAM files will reuse the ID if the deleted record has the highest ID in the database. MYISAM does not AFAIK. thanks ahead of time. query sql for the filter. jason wesley upton - 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 Sincerely, William Mussatto, Senior Systems Engineer CyberStrategies, Inc ph. 909-920-9154 ext. 27 - 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
Mysql Question - urgent help needed pls
Hi, Could any of you help me in getting a Performance Comparison document for MySQL on different architectures (Intel linux or S390 linux). Regards, prabha - 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: MYSQL question - Urgent
Hi Lucia.. 1- The answers might/will be depent on what type of installation you are planning to do. Will you compile source code, or install binaries, or , since you said you would be installing on Linux, will you install from RPMs? 2 - Yes , you need to do the installation as root . 3 - There is no special account to create InnoDB tables, but you need to make sure that your MySQL server supports InnoDB tables.. Once the server supports it, anyone who has privileges to create tables, can create InnoDB tables. To ensure that you will have InnoDB support right after installation, make sure to download mysql-version*MAX* files. The files with the MAX word in it come with InnoDB support if InnoDB is available for that platform, and in your case, for Linux, yes it is. 4 - Data files (the database/table files) are owned by mysql . 5 - If you download and install *MAX* binaries for Linux, you'll already have InnoDB support . 6 - Those are the really databases. Those are same as what you define as the database name after '@' in oracle. The most recommended book on MySQL is MySQL by Paul Dubois, see its web page: http://www.kitebird.com/mysql-book/ . As for the user group, don't restrict yourself to the area you are living in, this list is a global user list of MySQL :) Make sure to visit the following pages: http://www.mysql.com/doc/L/i/Linux-RPM.html http://www.mysql.com/doc/I/n/Installing_binary.html http://www.mysql.com/doc/P/o/Post-installation.html Gurhan Ozen MCI WorldCom Quality Assurance Team [EMAIL PROTECTED] ph: 703-449-4754 Vnet: 228-4754 1-800-PAGE-MCI pin: 1927052 AIM: Greywolf1923 -Original Message- From: Lucia DeMeester [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 11:19 PM To: [EMAIL PROTECTED] Subject: MYSQL question - Urgent Importance: High I am an Oracle DBA and need to create a MYSQL database on Thursday. Can you answer my questions? (I have not had chance to read the manual yet. Just a quick search, I can not find my answer.) I plan to use InnoDB and I find it is quite similar to Oracle. However, in Oracle we install the software and create the instance and database as oracle but I can not find any place describe what user I should use to create mysql database. We use Linux. Questions: - Do I use root account to install the software? - What account do I use to create Innodb? - Who owns the data files? root or mysql - Any suggestion of the owner and group for the mysql files? - I think the process is to load the mysql software, then configure the Innodb. Once the Innodb is configured, when you mean startup or shutdown mysql server is this the same as shutdown the Innodb? - When I query show databases, it give me mysql, test1, test2. Are they really databases or they are like schema owners in Oracle and Innodb is like instance in Oracle. P.S. What is a good book to buy for the MYSQL database and any user group in the United States I can belong. Thanks very much. Lucia DeMeester New Media Merchants 858-882-8500 ext. 2314 - 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
Re: MYSQL question - Urgent
Hi. Sorry, but I beg to differ. I think it is not a good idea to recommend to others to run the MySQL server as root. The manual explicitly recommends otherwise. On Mon, Apr 29, 2002 at 10:15:31PM -0600, [EMAIL PROTECTED] wrote: Questions: - Do I use root account to install the software? Yes to compile the source or do an RPM as seen below. See http://www.mysql.com/doc/L/i/Linux-RPM.html The usual approch is to create an UNIX user mysql and give all files to him (of course, you need the root account to do so). If you use a reasonable distribution and can use the packaged MySQL, the package manager will do this for you (e.g. Debian, Mandrake,... don't know of others). Then you either start MySQL as mysql. Or as root and tell MySQL (via command line option) to run as mysql. This is surely described somewhere in the installation sections. Read it! It seems big but if you pick the parts relevant to your system, it's only some pages. And you will save a lot of hassle you would get later. - What account do I use to create Innodb? Same - I am guessing here but I do all installs as root then give the needed permissions to others. Maybe I am not up to date here, but usually you only need a database login to create a database and that has nothing at all to do with the UNIX root. - Who owns the data files? root or mysql Root - See http://www.mysql.com/doc/P/r/Privilege_system.html The user the MySQL daemon runs as. I can only second the rest of the advices. [...] Bye, Benjamin. -- [EMAIL PROTECTED] - 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
MYSQL question - Urgent
I am an Oracle DBA and need to create a MYSQL database on Thursday. Can you answer my questions? (I have not had chance to read the manual yet. Just a quick search, I can not find my answer.) I plan to use InnoDB and I find it is quite similar to Oracle. However, in Oracle we install the software and create the instance and database as oracle but I can not find any place describe what user I should use to create mysql database. We use Linux. Questions: - Do I use root account to install the software? - What account do I use to create Innodb? - Who owns the data files? root or mysql - Any suggestion of the owner and group for the mysql files? - I think the process is to load the mysql software, then configure the Innodb. Once the Innodb is configured, when you mean startup or shutdown mysql server is this the same as shutdown the Innodb? - When I query show databases, it give me mysql, test1, test2. Are they really databases or they are like schema owners in Oracle and Innodb is like instance in Oracle. P.S. What is a good book to buy for the MYSQL database and any user group in the United States I can belong. Thanks very much. Lucia DeMeester New Media Merchants 858-882-8500 ext. 2314 - 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: MYSQL question - Urgent
Questions: - Do I use root account to install the software? Yes to compile the source or do an RPM as seen below. See http://www.mysql.com/doc/L/i/Linux-RPM.html - What account do I use to create Innodb? Same - I am guessing here but I do all installs as root then give the needed permissions to others. - Who owns the data files? root or mysql Root - See http://www.mysql.com/doc/P/r/Privilege_system.html - Any suggestion of the owner and group for the mysql files? See http://www.mysql.com/doc/P/r/Privilege_system.html - I think the process is to load the mysql software, then configure the Innodb. Once the Innodb is configured, when you mean startup or shutdown mysql server is this the same as shutdown the Innodb? see http://www.mysql.com/doc/I/n/InnoDB_overview.html for some help on this - When I query show databases, it give me mysql, test1, test2. Are they really databases or they are like schema owners in Oracle and Innodb is like instance in Oracle. Yes they are real. The MySQL one holds your user permissions See http://www.mysql.com/doc/P/r/Privilege_system.html P.S. What is a good book to buy for the MYSQL database and any user group in the United States I can belong. Number one is Paul DuBois - Search Amazon or Ask Paul hereG Your in the Best Mysql NewsgroupG There are some heavy users here and they can help out but Please try and read the manualG http://www.mysql.com/doc/index.html Also for commercial use you should take a look at http://www.mysql.com/doc/B/u/Business_Services_Commercial_licenses.html These are only my opinions but they work hereG 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
Re: [PHP] MySQL question...not sure if this is the correct forum to ask.
Luie, Wouldn't replace change all the entries in your table row, same effect as update? I believe the question is how to test which entry in a form has a new value and replace/update only that value in the table. If I have a form... __ |Employee Record Update| | | |ID No: 1234 | |Name:_| |Address: _| |Status: Married | | | |Submit| -- If I have this table... _ |idnonameaddressstatus| |-| |1234Peter45 street Single| |_| Which means I only want to replace the status and the name and address remains the same. How do you test w/c entries in the form have new values and change only those entries in the table? Peter, this is basically what your asking, right? I actually need to figure this one out myself so I would appreciate any info. Do not use REPLACE if the table uses an AUTO_INCREMENT id, because if you do, any other tables linking into the id column will need to be changed/become dislocated. Even if this is not the case, under these circumstances a REPLACE is two db operations (DELETE followed by INSERT) and should be 'costed' accordingly. In order to populate the form you must have first performed a SELECT to retrieve the data from the db. So from there you can figure out what the data used to be - if you want/need to. You already have/send the existing data values in/to the form (and can have it return form values as normal, and include the 'original values' in invisible fields - if you have to go that far). When the form response comes back you have two choices: 1 PHP: use PHP to compare the ex-db values and the values returned from the form, then dynamically construct a precise UPDATE statement (tailoring the SET clauses to the requisite column name and data value pairs). This is a bit fiddly - and becomes more so as the number of form fields increases. 2 MySQL: use the intelligence of the MySQL UPDATE command (RTFM: MySQL only changes those values which need to be changed) and issue a command which appears to UPDATE every possible-form-affected column (regardless of whether is needs to be updated - according to 'form-thinking', because MySQL will decide for you and do the 'database-thinking') Regards, =dn What about REPLACE? http://www.mysql.com/doc/R/E/REPLACE.html 'REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a unique index, the old record is deleted before the new record is inserted' Hi, Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on each column. I want to check each column and see which has been changed and update the table for entries that were changed only. for each column data { if column is changed then update; else do nothing; } Maybe I am making this too complicated than it needs and just go ahead and update all of the columns regardless with the new values, regardless they are actually different or not. Thanks in advance, -Peter - 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: [PHP] MySQL question...not sure if this is the correct forum to ask.
Wouldn't replace change all the entries in your table row, same effect as update? I believe the question is how to test which entry in a form has a new value and replace/update only that value in the table. If I have a form... __ |Employee Record Update| | | |ID No: 1234 | |Name:_| |Address: _| |Status: Married | | | |Submit| -- If I have this table... _ |idnonameaddressstatus| |-| |1234Peter45 street Single| |_| Which means I only want to replace the status and the name and address remains the same. How do you test w/c entries in the form have new values and change only those entries in the table? Peter, this is basically what your asking, right? I actually need to figure this one out myself so I would appreciate any info. thanks... luie What about REPLACE? http://www.mysql.com/doc/R/E/REPLACE.html 'REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a unique index, the old record is deleted before the new record is inserted' Hi, Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on each column. I want to check each column and see which has been changed and update the table for entries that were changed only. for each column data { if column is changed then update; else do nothing; } Maybe I am making this too complicated than it needs and just go ahead and update all of the columns regardless with the new values, regardless they are actually different or not. Thanks in advance, -Peter __ www.edsamail.com - 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
FW: [PHP] MySQL question...not sure if this is the correct forum to ask.
-Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL question...not sure if this is the correct forum to ask. Hi, Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on each column. I want to check each column and see which has been changed and update the table for entries that were changed only. for each column data { if column is changed then update; else do nothing; } Maybe I am making this too complicated than it needs and just go ahead and update all of the columns regardless with the new values, regardless they are actually different or not. Thanks in advance, -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.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
RE: [PHP] MySQL question...not sure if this is the correct forum to ask.
What about REPLACE? http://www.mysql.com/doc/R/E/REPLACE.html 'REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a unique index, the old record is deleted before the new record is inserted' Regards, Dan -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 February 2002 11:10 a.m. To: [EMAIL PROTECTED] Cc: '[EMAIL PROTECTED]' Subject: FW: [PHP] MySQL question...not sure if this is the correct forum to ask. -Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL question...not sure if this is the correct forum to ask. Hi, Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on each column. I want to check each column and see which has been changed and update the table for entries that were changed only. for each column data { if column is changed then update; else do nothing; } Maybe I am making this too complicated than it needs and just go ahead and update all of the columns regardless with the new values, regardless they are actually different or not. Thanks in advance, -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.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 - 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