Upgrading to MySQL 4.0
Currently, I'm running 3.23.51 on Red Hat 7.1, and I'm contemplating upgrading to MySQL 4.0, but I'm not sure what to expect. I don't know if MySQL 4.0 is fully backwards-compatible with 3.23.x versions, or if something is going to break if I upgrade. What are the main advantages of upgrading to 4.0? Speed? Features? I can go through the whole changelog if need be, but I'd prefer to hear what actual users are reporting as far as benefits and disadvantages. - Jonathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Cant login as a user I thought I created
I JUST had a problem very similar to this. However, it could be a number of different reasons, but here's what my problem was. I had two users in my users table that could connect via any name, any host, with any password but had no priveleges. You can probably test this by connecting to mysql without using a password - i.e. mysql -umark Don't ask me how those two accounts got there - probably a stray query somewhere. Anyhow, I deleted those two users, and everything worked perfectly from there. - Jonathan - Original Message - From: Mark Healey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 12:24 PM Subject: Cant login as a user I thought I created I'm trying to learn to use mysql. I don't want to mess with the system databases so I decided create a database and user to play with but I can't seem to do it right. I logged in as root and created a database mysql create database marksstuff; Query OK, 1 row affected (0.00 sec) I then granted priveleges to mark mysql grant all on marksstuff.* to mark identified by 'password'; not the real password Query OK, 0 rows affected (0.01 sec) I then logged out and tried to login as mark [EMAIL PROTECTED] mark]$ mysql -u mark -ppassword ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) What am I doing wrong? Mark Healey [EMAIL PROTECTED] This account is only for lists to which I've subscribed. Any spammers invite the worst revenge I think I can get away with. -- 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: Cant login as a user I thought I created
Delete anonymous user('') from table user. Don't forget about FLUSH PRIVILEGES. Thanks, that worked. Why? shaking head I suggested this yesterday, at the very beginning of Mark's question, and I also suggested it again today in a private message, but both of my suggestions got ignored, I guess. Keep your eyes open next time, Mark. - Jonathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysql shuts down overnight
Does it restart or just shut down? Do you have to start it up in the morning? And is there a specific time at which this happens? If you don't have logging on, you should consider turning it on for debugging purposes. After it happens again, check your error log (should be in your data directory - mine is in /usr/local/mysql/var/) - it should be a text file with a filename that ends with .err You might also want to check your /var/log/messages file for anything that looks suspicous or related to this. - Jonathan P.S. This probably isn't related to MyODBC, so for future posts in this thread, I'll only respond to the main MySQL list. - Original Message - From: Chen, Mao [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:06 AM Subject: mysql shuts down overnight Hi everyone, I got apache 2.0 + MySql 3.23.52 + PHP 4.3.1 on a Redhat 8.0 server. Somehow MySQL automatically shuts down overnight, anyone has a reason for this? Might because of cron? Thanks in advance! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL 3.23 vs. 4.0
Currently, I'm running 3.23.51 on Red Hat 7.1, and I'm contemplating upgrading to MySQL 4.0, but I'm not sure what to expect. I don't know if MySQL 4.0 is fully backwards-compatible with 3.23.x versions, or if something is going to break if I upgrade. What are the main advantages of upgrading to 4.0? Speed? Features? I can go through the whole changelog if need be, but I'd prefer to hear what actual users are reporting as far as benefits and disadvantages. - Jonathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
DB Performance - Celeron vs. P4
Currently, I have a Celeron 1.2 Ghz server with 512 RAM, and I'm considering moving to a P4 2 Ghz with the same amount of RAM. I have a few specific tables with several million rows of data, and it takes quite a long time to process that data on my current server. Does anyone have a good idea of the type of performance increase I'd see if I moved to a P4 server? I'm hoping to see a response like, Oh yeah - I moved to a P4 from a Celeron and operations that used to take 10 minutes now take 1 minute or less - all because MySQL has special options to take full advantage of the P4's power. Or something like that. fingers crossed - Jonathan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: I thought MySQL Supported Relationships
Actually, no. The addiction to MySQL has caused many relationship break-ups. There's probably even a database with that information out there somewhere. Probably a MySQL database, too. Meanwhile Access supports relationships because it blows so hard that people can't wait to get away from it and home to their families. - Jonathan -Original Message- From: Andrew Kuebler [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 11:35 AM To: [EMAIL PROTECTED] Subject: I thought MySQL Supported Relationships Hello Everyone. I'm still fairly a newbie to MySQL, but I could have sworn I read somewhere that MySQL supported relationships just like Access. I've searched the entire manual, and cannot find anything on the subject. Does MySQL support relationships, and if so does anyone know where I can find any info on the topic? Thanks! Andrew - 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: backup databases
I regularly back up all my databases with mysqldump: mysqldump -uUsername -pPassword --all-databases tmp.sql tar -cf MySQL-Backup-DATE.tar.gz -z tmp.sql rm -f tmp.sql I use a script (to determine DATE) in conjunction with cron to back all databases up nightly, and I also have the script e-mail the .tar.gz file to me so I can have a backup in case the server goes down. I've heard of hotcopy but never used it, so I couldn't recommend or unrecommend it. - Jonahtan -Original Message- From: Kory Wheatley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 10:27 AM To: [EMAIL PROTECTED] Subject: backup databases What is the best method to backup all your MYSQL DATBASES with not a lot of down time. I have read about using mysqlhotcopy and mysqldump are these the best methods. Also what procedure is followed in backing up the databases. I'm basically looking for the must accurate and reliable way of doing this. -- # Kory Wheatley Academic Computing Analyst Sr. Phone 282-3874 # Everything must point to him. - 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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: backup databases
Sure. Just create a new file called something like mysqlbackup.sh and chmod it to make it executable. Change any of the vars you want, and it should work (but remember to update the e-mail part of it to use whatever e-mail client you want, unless you just want to leave that part out) This is a customized script, so you'll probably need to tweak it to get it right for you. shrug #!/bin/sh # MySQL Backup Script # # Tarfile Info DATE=`/bin/date +%d-%b-%Y-%H-%M-%S` FILEPREFIX=MySQL-Backup-$DATE TEMPDIR=/tmp # You can also use stuff like hostname: # HOSTNAME=`/bin/hostname` # # As well as other date formats - check the # man pages on the date command for different # formats you can use. # MySQL Info USERNAME=root PASSWORD=password DATABASE=--all-databases # Email Info RECIPIENT=[EMAIL PROTECTED] NICEDATE=`/bin/date +%b-%d-%Y` SUBJECT=MySQL Backup for $NICEDATE # Do the tarring mysqldump -u$USERNAME -p$PASSWORD $DATABASE $TEMPDIR/$FILEPREFIX.sql tar -cf $TEMPDIR/$FILEPREFIX.tar.gz -z $TEMPDIR/$FILEPREFIX.sql rm -f $TEMPDIR/$FILEPREFIX.sql # E-mail the tarfile - Use whatever e-mail method you # want. I use perl, but another good one is biabam. BackupMailer.pl $RECIPIENT $SUBJECT $FILEPREFIX.tar.gz - Jonathan -Original Message- From: David McInnis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 10:53 AM To: 'Jonathan Hilgeman'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: backup databases Could you share your script for doing the date thing with the rest of us? That sounds useful. David McInnis -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 10:40 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: backup databases I regularly back up all my databases with mysqldump: mysqldump -uUsername -pPassword --all-databases tmp.sql tar -cf MySQL-Backup-DATE.tar.gz -z tmp.sql rm -f tmp.sql I use a script (to determine DATE) in conjunction with cron to back all databases up nightly, and I also have the script e-mail the .tar.gz file to me so I can have a backup in case the server goes down. I've heard of hotcopy but never used it, so I couldn't recommend or unrecommend it. - Jonahtan - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: need some help...
While this should be on the PHP list, here's the problem. You're not doing a printf or whatever function that is that replaces %s with values - you're just assigning the string to $retval. It should look something like: $retval .= printf(nbsp;nbsp;...yadayada); look up the syntax - I never use printf, so mine is probably wrong, but that's the problem. - Jonathan -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 1:46 PM To: [EMAIL PROTECTED] Subject: need some help... Hey Guys, I need help indentifiying why I have an error in this line of syntax: while($a=mysql_fetch_array($r)) { $retval.=nbsp;nbsp;nbsp;nbsp;a href=\%s\img src=\%s\ border=\0\/abrnbsp;nbsp;- a href=\%s\%s/abrbr,$a[url],$a[picurl],$a[url],$a[title]); } It just gives me a parse error on the page for the $retval. = line Thanks! -Alex Big Al Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [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 - 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: Impact of Free ORACLE
Geez, get a grip. You should've counted on the predictable, endless sarcasm that came as a reply to something that would've been pretty big news, NOT on only 1 or 2 people pointing out that you're wrong. Most critics here think that they will be the first or only person to reply, or believe their sarcasm needs to be heard. But this goes as a lesson to everyone - double-check, triple-check, and so on, before you blurt out something that you heard, even it was from reliable sources. And if those reliable sources turn out to be wrong, you'd better begin wondering whether you should listen to them again. This also applies to the people who just discredited his story without taking the time to do their own quick research on it, as I'm sure many of you did. Finally, to everyone who reads this: with such a post, there WILL be someone out there that responds to it, and you should only need to add your response after time goes by and either nobody responds to it, or a few people respond with the wrong answer. Otherwise, you're just going to fill up the list with sarcastic posts that do nothing but tick off the recipient. - J P.S. Try not to curse; it's a bad habit. -Original Message- From: MadProfessor [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 8:11 PM To: [EMAIL PROTECTED]; 'Charles McGrotty' Cc: [EMAIL PROTECTED] Subject: RE: Impact of Free ORACLE Ok, Ok, KIDZ, I get it. I had just heard from a rather reliable pair of sources that the oracle system was free, so I thought I'd ask you cats if you had any thoughts Now I get endless buillshit sarcasm, instead of the simple 1 or 2 people pointing out that I'm wrong. The rest of you guys who thought you were being original by giving me shit as if we were on slashdot need to realize there's no call for all that. I was trying to find out more about how everyone felt. I still run MySQL on my servers, and while I was interested in how Oracle works, I wasn't about to switch, so don't feel like you need to be questioning my geekiness, nor my interest in free software or open source. End fucking rant, have a nice day. VJ MadProfessor - 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
Unix Jobs?
I'm currently working as a e-commerce web programmer specializing in PHP, MySQL, and Apache systems. I've had experience on FreeBSD and Linux systems, and now the company I work for seems to be being bought out at which point, several of us may lose our jobs. Now, I've been searching all over Monster.com, HeadHunter.net, etc... for a compatible job in my area, but it just isn't panning out - most employers are Java and ASP hungry, and I couldn't classify myself as an expert on either at this point, even though I've worked with VB for a bit. My question is this: are there any job sites out there that deal more exclusively with the Unix world so I could find one in my area (Orange County, CA)? Also, is there anyone on this list that is currently looking to hire on a programmer like me? If you can answer yes to my second question, please respond in private - I don't want the MySQL mailing list to start flaming this post for some reason. Thanks! - Jonathan - 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: [ANN] Blue World Announces Lasso vs PHP White Paper
Ah, the keywords with commercial add-ons. Notice the plurality, as well. I wonder which add-ons and how many total add-ons were considered in making this cost estimate. I also wonder if most of us would even need more than one commercial add-on at most. - Jonathan -Original Message- From: Cathy Cunningham (Blue World Lasso Evangelist) [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 12:37 PM To: Chuck PUP Payne; [EMAIL PROTECTED] Subject: Re: [ANN] Blue World Announces Lasso vs PHP White Paper At 1:19 PM -0500 3/7/02, Chuck \PUP\ Payne wrote: But who wants to pay. Get a clue that's why PHP, PERL, and other Open Source Lang., are widely more used. If you do a true comparison in features, you'll see that a PHP-based solution (with commercial add-ons) costs over three times the cost of Lasso. Then there's also the (TCO) total cost of ownership where due to productivity gains in using Lasso, developers end up saving lots of time (e.g. money) compared with using other tools. Then there's also the fact that when you buy Lasso Professional 5, you're also supporting MySQL AB as each copy purchased puts money in their pockets. And, this is a good thing to ensure the future vitality (and growth) of the MySQL market. It also gives you peace of mind in knowing that you have a commercial license of MySQL, which can help ease liability and other concerns that may otherwise be present in certain organizations who may have concerns using just GPL products. Then there's the issue of quality. With Lasso Professional 5, no stone remains unturned with respect to ensuring Web developers have the highest quality offering both in terms of features, documentation, support materials and more. CC -- - Cathy Cunningham [EMAIL PROTECTED] Lasso Evangelist Blue World Communications, Inc. http://www.blueworld.com/ - Lasso Studio is the easiest way to create a database-driven Web site - Macworld Magazine - 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: [ANN] Blue World Announces Lasso vs PHP White Paper
All we're doing here is providing information on a report that was just released and answering questions and clarifying mis-perceptions. Don't you mean All we're doing here is marketing our product to an e-mail list ... ? Sharing information for the betterment of the community is good for us all. And the community sharing their money with Blue World is good for Blue World. I've always believed that the best products and companies are created to satisfy an existing, real demand, not to first create the supply, and then also create artificial, new demand. You really don't see Red Hat or many other UNIX-related systems marketing themselves in magazines a lot (there are SOME ads, but not many), but yet they have so much popularity because those operating systems are good and meet a demand for more stable, faster environments. People come to them, not vice versa. I mean, I've never EVER been hit with an e-mail saying, Come see what Red Hat Linux can do for you. Buy our packaged CDs in Office Depot! Obviously sometimes there's a demand and a product can get released without people realizing that the product can satisfy that demand, and promotion is obviously involved to some degree in everything. But after getting so many REPEATED, negative responses from the list in the past about spam, I'm really surprised that Blue World continues to try and market their product on these lists. It's a I-Don't-Care-How-Many-People-Get-Annoyed-As-Long-As-I-Get-A-Sale attitude, and I think it reflects the quality of service that we'd receive if we signed up, because the company is willfully choosing to ignore large amounts of protest to achieve their own success. Don't you think that if Lasso was a truly incredible product, we'd all be reading more and more messages that say something along the lines of, Oh - in this case, your best bet would be Lasso... ??? Yet I rarely see these messages. Blue World really needs to begin paid marketing in magazines and other forms of media where other commercial products are normally advertised. It would probably closely match your target market (assuming you have done the research to develop an SMP (Strategic Marketing Plan), and you wouldn't tick off everyone on these lists. - Jonathan The sql-database-query-mysql Man - 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: [ANN] Blue World Announces Lasso vs PHP White Paper
The lesson here is don't preach to those who might not want to be converted. W.W.J.D. - after Jesus cast the demon Legion out of that one guy, the people in that area asked him to leave and he left without any arguments. Take a hint from the Savior, Blue World. grin - Pastor Jonathan Reverend of all things MySQL DISCLAIMER: I am not really a pastor or reverend. Don't use my words as accurate Biblical reference - the real story can be found somewhere around the beginning to middle of Matthew. And don't drink and drive. And never smoke query or sql. Or just don't smoke. -Original Message- From: Kim Kohen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 2:36 PM To: [EMAIL PROTECTED] Subject: Re: [ANN] Blue World Announces Lasso vs PHP White Paper G'day Cathy we feel it only fair to be given the opportunity to correct said misinformation. EUREUREUREUR You're forgetting that your original mail was forced upon us by you - in my eyes, your right of reply is dissolved with this action. If you don't like the negative response, don't make the original post. What you needed to do was a brief message saying the comparison was available at x link and I'm sure those interested would have looked. Instead, you p*ssed lots of people off. The lesson here is don't preach to those who might not want to be converted. cheers kim mysql, query - 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: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10?
PHP is looking for the client library that gets installed with MySQL 3.23.4+. Now, you can try a QUICK fix that might not work, but it's worth a shot. Go to the directory that has the libmysqlclient.so.11 file and type the following: ln -s libmysqlclient.so.11 libmysqlclient.so.10 That should create the file libmysqlclient.so.10 that links to ...so.11. If the client library is vastly different, though, it might not work. If it doesn't work, you should go uninstall PHP, go to the directory where everything was being compiled, edit the necessary files to have PHP use libmysqlclient.so.11 instead (this might be in the Makefile - but be sure you run a make clean first), and recompile. I don't know how different the PHP RPM will be, but there should be a place where you can change the reference to libmysqlclient. I use FreeBSD's ports system and it has a special configure script that creates a little addon to the Makefile that specifies the library version numbers like 10 or 11, and you can change that file before compiling. - Jonathan -Original Message- From: Ronald Arenas [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 12:19 PM To: Mysql Subject: Please Help! MySql 4.01/PhP 4.06 looking for Libmysqlclient.so.10? I have installed MySql 3.23.49, PHP 4.06, and Apache 1.3.20 successfully on my RH 7.2 box. Now I try to install MySql 4.01 (after removing MySql 3.23.49) I get a Php-mysql.4.xx requires libmysqlclient.so.10. My attempt to install MySql 4.01 ends there. I did some reading and found that libmysqlclient.so.10 comes with MySql 3.23.xx. I surfed my directories to find that MySql 4.01 installs libmysqlclient.so.11 I installed theses packages using the RH RPM Manager. Am I missing something? Ron Arenas - 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: Is The MySQL Mailing List On Crack?
I'm getting this, too. I first noticed it when Monty appeared to start spamming us with release announcements. :) - Jonathan -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 5:15 PM To: [EMAIL PROTECTED] Subject: Is The MySQL Mailing List On Crack? I'm getting duplicate messages separated by several hours. Am I alone in this, or are others seeing it too? Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 5 days, processed 189,890,555 queries (402/sec. avg) - 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: BSD and MySQL : Major Problems
I would first check your /var/log/messages file, or whatever file is receiving your system warnings/errors. This could be a filesystem problem. If you're not logged in as root, just keep trying your program until you get that error, and quickly go to the shell and type: ls -lt /var/log That should give you a listing of that directory with the most-recently-modified files first, and check some of the first listed logs for errors related to your problem. - OR - This could also be your program attempting to open/read a directory as a file instead of opening it as a directory. What's your code for opening it? Are you using a variable that should contain the filename? If so, have you done debugging to see if that filename is ever blank for any reason? (Print out the variable just before you run the file-open) - Jonathan -Original Message- From: phinney [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 9:38 AM To: [EMAIL PROTECTED] Subject: BSD and MySQL : Major Problems I am having some problems with MySQL and FreeBSD SMP 4.4 (STABLE) and (FAST) on an Intel platform. First, some vitals : - I am using the MySQL 3.23.48 FreeBSD 4.4 ELF binary, along with the latest versions of DBI/DBD::MySQL. I installed the binary, setup was no problem. I compiled the DBI and DBD sourced from CPAN. Again, no problem. Also using perl 5.6.0 that came with BSD. The Problem - I have a problem that rears its ugly head semi-occassionally. Basically, I get the following error. DBD::mysql::db tables failed: Can't read dir of '. /p0_samt_trans/' (Errcode: 2) at /var/SAMT/code/SAMTlib/SAMTdb.pm line 2552, FILE chunk 138. If I repeat the code snippet that caused that error not two seconds later, it will work fine. There seems to be no pattern to the occurrence of the error. No trigger. It just happens out of the blue. It also happens to any of the Databases, not just the one listed above. Any ideas - any help would be much appreciated. Brad, - 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: BSD and MySQL : Major Problems
1) It may seem OS dependent, but unless you've tried the other 2 OSes on the same box with the exact same setup (unlikely), I wouldn't blame the OS right away. (Can you tell I'm biased towards FreeBSD?) 2) This seems to still point to the file system, so again, check your errors/error logs/message logs for issues related to this. 3) You still didn't provide your code. 4) What's your MySQL data directory? 5) Are there any other programs that access MySQL on this server or any filesystem utilities that are running (indexing, searches, etc...)? - Jonathan -Original Message- From: Brad Phinney [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 8:39 AM To: Jonathan Hilgeman Cc: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: BSD and MySQL : Major Problems The problem with this error is (1). It seems OS dependent (cannot recreate it on Linux, Solaris). (2). It happens randomly, no rhyme nor reason. I am simply making a DBI call to do ALTER TABLE or tables- command. One second it could fail to open the DB directory (hence the error). Three seconds later, the command succeds. No reason. Just does. It seems as if occassionally, a mysqld thread forgets its working directory for data, and thus complains that it cannot open the database. On Wed, 13 Feb 2002, Jonathan Hilgeman wrote: I would first check your /var/log/messages file, or whatever file is receiving your system warnings/errors. This could be a filesystem problem. If you're not logged in as root, just keep trying your program until you get that error, and quickly go to the shell and type: ls -lt /var/log That should give you a listing of that directory with the most-recently-modified files first, and check some of the first listed logs for errors related to your problem. - OR - This could also be your program attempting to open/read a directory as a file instead of opening it as a directory. What's your code for opening it? Are you using a variable that should contain the filename? If so, have you done debugging to see if that filename is ever blank for any reason? (Print out the variable just before you run the file-open) - Jonathan -Original Message- From: phinney [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 9:38 AM To: [EMAIL PROTECTED] Subject: BSD and MySQL : Major Problems I am having some problems with MySQL and FreeBSD SMP 4.4 (STABLE) and (FAST) on an Intel platform. First, some vitals : - I am using the MySQL 3.23.48 FreeBSD 4.4 ELF binary, along with the latest versions of DBI/DBD::MySQL. I installed the binary, setup was no problem. I compiled the DBI and DBD sourced from CPAN. Again, no problem. Also using perl 5.6.0 that came with BSD. The Problem - I have a problem that rears its ugly head semi-occassionally. Basically, I get the following error. DBD::mysql::db tables failed: Can't read dir of '. /p0_samt_trans/' (Errcode: 2) at /var/SAMT/code/SAMTlib/SAMTdb.pm line 2552, FILE chunk 138. If I repeat the code snippet that caused that error not two seconds later, it will work fine. There seems to be no pattern to the occurrence of the error. No trigger. It just happens out of the blue. It also happens to any of the Databases, not just the one listed above. Any ideas - any help would be much appreciated. Brad, - 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 .so missing - help!
Well, first of all, if you're just starting out with all this and don't have any critical data, I recommend you dump your PHP and MySQL installations and install the latest, stable releases of everything: PHP 4.1.1 and MySQL 3.23.48 - there are a lot of bugs fixed and functionality added in these versions. Now, there are two parts to a MySQL installation - server and client. The server is the portion you normally regard as being just MySQL - it creates and manipulates the databases, etc... The client is just a set of libraries and methods that you or a program can use to connect to the MySQL server portion. PHP uses the library called libmysqlclient.so, which gets installed when you install the MySQL client portion. On my FreeBSD server, those libraries get put in /usr/local/lib, but they really can go anywhere, as long as PHP knows where to find it. You also have to be careful with versions - if PHP is compiled using an old version of libmysqlclient.so, and then you upgrade MySQL, PHP might start dying mysteriously until you re-compile PHP. So I recommend: 1) Uninstall both 2) Install latest MySQL 3) Install latest PHP You should not have to enable the extension in your php.ini file - that section, I believe, is reserved for Windows users. PHP automatically uses the extensions it gets compiled with. - Jonathan -Original Message- From: AL [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 11:38 PM To: [EMAIL PROTECTED] Subject: MySQL .so missing - help! Hi I am new to MySQL and PHP, so - please be gentle.. We are running PHP4.0.1 and mysql 9.38 (Distrib 3.22.32) on our development server (Debian Linux). I am trying to setup a database with mysql and PHP. I tried to install phpMyAdmin 2.2.3 and can't access the index page. I get an error about the mysql extension: cannot load MySQL extension, please check PHP Configuration MySQL is there, I can get to it and create databases etc but it won't talk to php. In php.ini, there is no reference to MySQL.so under Dynamic Extensions. Further, I can't locate the file MySQL.so or mysql.so *anywhere* on the server. I used the locate command to try find it. I didn't set up apache, php and mysql and am a little nervous about making changes - any suggestions? Thanks Alka [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 - 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 with TTF fonts
Hi Makis, There are separate PHP mailing lists - you can find them at www.php.net - Jonathan -Original Message- From: savaidis [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 11:29 AM To: MySQL list (E-mail) Subject: PHP with TTF fonts Hello again! I see many people works here with php and that's natural, as php is connected with MySQL. In php graphics, I found that printing with a TTF font has no possibility to set the font high. Is this true? Also is not possible to open only once one font file and not as many times as text stings are displayed on the image? This is to slow and consumes to much of server's memory. Thanks Makis - 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: urgent respnse
Call me Ishmael. My whale and I would like to tour Mongolia, but alas, my whale swallowed a group of Enron executives, including the entire Bush administration, and now he is too full of money to walk. Please help me by sending your bank account information so I can safely deposit the money in a stranger's bank account. Also, please do not make this list subscribers-only, since that would make it harder for me to send you my money. Thank you for your time. - Jonathan Database-Will-Get-You-In -Original Message- From: oscar malaba [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 3:27 PM To: [EMAIL PROTECTED] Subject: urgent respnse SOS Oscar Malaba oscarmalabaxyahoo.com Bamako Mali Dear sir I know this will come to you out of the blue as a surprise. I write this crucial mail to solicit your assistance in a transaction that will be very beneficial to you, with hope that you will never let me down either now or in future. Please study the following account carefully and respond urgently. I am Oscar Malaba a Zimbabwe nationality, the eldest son of late Honourable Adam Malaba. My father served the President Mugabe's government faithfully in various capacities as a minister and chairman of agriculture trust fund. He was however arrested on 4th April 2001 because he was against Mugabe's government concerning the ongoing land dispute that erupted in Zimbabwe since last year. My father while in detention was humiliated and tortured by Mugabe's security operatives, in spite of his falling health and as a result he died in detention on the 28th day of April 2001. Before his death, he confided to me and my brother the existence of Eighteen million five hundred thousand United State dollar (18.5M US dollar) he secretly lodged in a vault. My brother and I are the only people in my family who are privy to this information, the money is now in our custody (cash). Since his arrest, my family has been subjected to untold hardship and harassment. All my father's assets has been confiscated. His accounts frozen and we were been attacked and driven out of our family house in Harare. Narrowly I escaped to Mali with my family and the boxes containing the money. On getting to Mali, we applied for political asylum. I could not take such a huge foreign currency to bank without raising an eyebrow. So I quickly deposited the boxes with a reputable security company as family valuables. I have the depository agreement and the certificate of the deposit issued to me by the security company. I was waiting to have a legal status before I could invest the money here. But last week I received a mail from Mali government informing me that I and my family are not eligible to obtain political asylum, that my father was the one who had problem and not members of his family and to that effect we should be ready to go back to Zimbabwe soon. At this point, I am frustrated and simply tired. My family lawyer advised me to leave Africa. For this reason, I want you to assist me to shift and invest this fund outside Africa. I will compensate you generously to as much as 20% of the said amount at stake if only you can help me. I and my family will use the remaining 80% to start new life and seek a new happiness in overseas. This transaction demands expediency, secrecy and absolute trust. Our destiny is in your hands, do not abandon us. Please assist us to escape this spectres of political persecution going on in Africa. More also treat this mail with utmost confidentiality because of my safety and the money. I eagerly await your reply. Thanks and God bless Yours faithfully Oscar Malaba __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.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 - 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 Doesn't Display Databases
Not sure if this is a tough one or an easy one. Take a shot at it - maybe you can solve it. I have a production server running 3.23.36-log, and I just set up a development box about a week ago. The development box was intended for testing out new versions of things, so we had MySQL 3.23.42 on there. Now we want to mimic the production server and put 3.23.36 on there, among other things. So I copied over the document root from the production server to the development box, which included phpMyAdmin. I then deinstalled 3.23.42 (a FreeBSD port), and downloaded the source for 3.23.36. I configured it as follows: ./configure --prefix=/usr/local/mysql-3.23.36-debug --with-unix-socket-path=/tmp/mysql.sock --localstatedir=/cartman/mysql --with-debug I ran make and make install and everything went fine. My original databases were in place, but when I tried to load up phpMyAdmin, it connected, and showed the normal phpMyAdmin page, but displayed small icons (the expand/shrink menu icon box-thingy) in the menu for each database, which is normal, but there were no database names next to the icons, which is not normal. I figured that perhaps it was the original databases that were incompatible for some reason. The only difference between the production and development versions was that the development version had debugging enabled (as shown in the configure line above). I then shut down MySQL, renamed the database directory, and created a new one in its place, and ran the mysql_install_db script to put in the default mysql and test databases, which worked fine. I updated the root password so that it matched the old one in phpMyAdmin's config file, and ran phpMyAdmin again. I have the same story - with icons for both mysql and test, but I don't see their names - just two icons. If I try to create a new database from phpMyAdmin (for example, 'devtest'), I get an error, but the 'devtest' directory gets created correctly. If I use the command-line 'mysql' program, I can see all the databases with SHOW DATABASES and tables with SHOW TABLES, etc... I thought maybe it was a corrupted version of MySQL, but I tried another version and it had the same effect. I know it is CONNECTING because phpMyAdmin will die on me if I change the connection info to something incorrect, not to mention that it somehow knows the NUMBER of databases, because it shows one icon per database. Is there a problem with enabling debugging that causes other programs like this to fail? - Jonathan - 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: Heads up re Spam.
While I don't like the idea of limiting messages to subscribers (I hate signing up for things, especially when I'm only going to post a few messages), I think it's still very important. Like any other problem, ignoring it will only send a message of passive acceptance and the amount of spam WILL increase. Don't fool yourselves into thinking that it will go away. Complaining that it's taking too long and too many messages to discuss a problem is frankly a selfish and self-denying point. You're the ones who want to ignore the spam, but at some point the amount of spam will be as numerous as the messages you're complaining about now. Consider this a glimpse at the future if we ignore the problem. I don't believe spam will ever go away since some people are just determined to get it through to everyone they can. However, we CAN eliminate a lot of it because the majority of spammers are lazy. So consider these two options: 1) The list gets restricted to member-posting only or at least something to the effect of PHP's mailing list where your first initial post must be verified to go through, and all subsequent posts are fine. As I said before, since the majority of spammers are lazy, I don't believe many will take the time to verify and send it out again... but you never know. In any case, the list gets restricted and the amount of spam drops, as do these types of arguments. I don't think people are going to raise hell over an occasional spam. Once spamming programs find a way around the verification/subscription programs, there will have to be additional improvements on them to continue to deny those spamming programs. But the bottom line is that spam will drop. 2) The list stays the same. There will inevitably be more discussions like this after a series of spammings, which will take up bandwidth, magnetize your credit cards, and sour your milk. It'll be annoying because we'll all be getting the spams and the protests against it. You'll get annoyed just because of the protesters, but there's really nothing you can do about them. The way I see it, we should go to option #1, as much as I hate subscribing. It just makes the most sense. - Jonathan -Original Message- From: Marjolein Katsma [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 12:30 AM To: Michael T. Babcock [EMAIL PROTECTED] [RegSoft/mysql]; MySQL Subject: Re: Heads up re Spam. At 07:16 2002-01-11, Michael T. Babcock wrote: On Thu, Jan 10, 2002 at 08:55:35PM +0100, Marjolein Katsma wrote: That proves it's a REAL problem for subscribers to this list. No, it proves that some subscribers (like yourself) have real problems. Your E-mails will all be blacklisted at my border if I see you whining about this on-list again; So? whine to the administrators _in private_. This is a matter that concerns all members of this list. If I am in a minority, fine. But even a minority should have a voice. The fact that people are actually *leaving* this list because of the continuing spam should give the administrators (and you ) a clue. Wouldn't they rather lose the spammers than valuable list members? If you raise the noise ratio from .5% to 2.5% by whining so much, who is really the problem? The list management - because they do not limit posting to subscribers only. Your logic skills are extremely lacking. The list administration did not require you to post your whining to the list. I don't want to hear what you have to say about spam; I ignore the spam as, obviously, do the hundreds of other subscribers not whining on the list. My logic skills are fine. The list administrators are forcing me to pay for downloading the spam they let through. They should not. I don't mind paying for member's posts, I do mind paying for spam. As long as spam is allowed here, this will keep coming up. Ignoring spam is not a solution - we *all* pay for it because of the huge costs involved with the bandwidth it takes up. PS, I post to a lot of lists I'm not a member of. So do I. The ones that _require_ membership for me to post lose my traffic as well as my use of their software. The ones that do not require membership to post *all* suffer from spam. Hence I much prefer posting by members only. database,sql,query,table -- Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools The Bookstore - http://books.hshelp.com/ - Books for webmasters and webrookies - 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/
RE: 4416 Great Growth Potential 185528
A good spam-blocking keyword is the word guarantee. Just block out messages with that keyword and most of your spam issues will go away. I've used that technique for a couple years now, and it's worked great. I've had to add a couple other words to my filter to pick up on adult material as well, but for the most part, guarantee catches all that other crap. - Jonathan -Original Message- From: Billy Harvey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 7:27 PM To: mysql Subject: Re: 4416 Great Growth Potential 185528 On Wed, 2002-01-09 at 23:08, [EMAIL PROTECTED] wrote: OTC News Alerts' Last 3 Picks have gained 358%! Here is our next Hot Pick! Dear MySQL list, I'm afraid I've had it. I don't post often here - but I probably help on average one person a day by working directly with them in the background. I considered it payback for the value I got from others over the years. But, I can't stand the quantity of spam here. The list needs to be made subscriber only, or I suspect the only people that will be left here soon will be the company and the spammers. Good luck to all. Someone let me know if the policy changes. Thanks for a great product. Billy - 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: apostrophe's in PHP MySQL
You can also try replacing quote marks with their HTML-equivalent entities. Put this function in your code somewhere: function PrepareQuotes($Var) { $Var = str_replace(',#039;,$Var); $Var = str_replace('',#034;,$Var); return $Var; } And on variables that might have apostrophes or quote marks, do this: $VarWithApostrophe = PrepareQuotes($VarWithApostrophe); So something like Joe's Farm will look like Joe#039;s Farm. It gets inserted into the database without any addslashes, and when you retrieve it from the database, it should work fine without any converting to this or that. - Jonathan -Original Message- From: Tim Thorburn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 7:11 PM To: [EMAIL PROTECTED] Subject: apostrophe's in PHP MySQL Hi, I've been experiencing some sporadic problems with a few web forms written in PHP 3.0.16 and MySQL 3.23.31 with text fields (both single lines and rows). Generally if any of the text in these forms contains an apostrophe - either nothing is entered into the database, or nothing after the apostrophe is entered. Is there a way around this? Or is this a limitation of my older versions of PHP and MySQL? Thanks -Tim - 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: 2 queries in one?
SELECT * FROM table WHERE (Status != closed) OR ((Status = closed) AND (Date Now - # of seconds in 2 weeks)) That should work if your Date field is just a regular timestamp. It all depends on how you're storing the date... - Jonathan -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 7:11 AM To: [EMAIL PROTECTED] Subject: 2 queries in one? I've looked through the docs and I couldn't find out how to do this. If you can point me to the right place in the documentation so I can read how, that would be great. If you could give me a little sample query to start from, that would be great as well. I've 2 columns in a table. Status and Date. I want to select all rows regardless of the values in either. However, if the status is closed, I only want those closed records that are less than 2 weeks old. Can this be done in one query? If so, how? And where can I read how to do this in the docs? thnx, Chris - 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: where
use a REGEXP: http://www.mysql.com/doc/R/e/Regexp.html - Jonathan -Original Message- From: julian haffegee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 01, 2002 2:11 PM To: [EMAIL PROTECTED] Subject: where Hi, I have recently gained access to mysql (new isp), and am converting my old text databases to sql ones. I had a text database with a field 'keywords'. I have entered them as one field, What I want to do is submit a query where I can ask if this field CONTAINS rather than equals a string. Can you use regular expressions in this way? I want to have something like $result = mysql_query (SELECT title, keywords, description FROM documents WHERE keywords='$word'); but with keywords 'contains' '$word' a bit like keywords =~ m/$word/g in perl How would you all go about this? should I set my database up differently? Thanks very much! Jules - 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: Implement a menu structure using an relative database
This might help: http://php.sitecreative.com/faq.php#3 - Jonathan -Original Message- From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 8:59 AM To: [EMAIL PROTECTED] Subject: Implement a menu structure using an relative database Hi! I'm currently working on a menu system for web pages, but I've run into some problems... What I'ld like to create is a menu which can host an infinite number of submenus. Further more, every menu should also be able to link to a specific file, though not always used. I would like to be able to get the entire menu in one sql-line, that is, I would like to be able to get the following in one line: - menu1 - menu2 - menu1 - menu2 - menu1 - menu2 * some text * some more text - menu3 - menu3 - menu3 I'm doing my scripting in PHP, but I want as much as possible of the menu structure to be only mySQL-specific. But having to use some loops to be able to create the sql-line is no problem. I desperately need help on this one, I've put down much energy and time to solve it but... Sincerely Victor Spång Arthursson - 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: Could you look at this PHP/MySQL Code?
It's mysql_query($sql3) not mysql_result($sql3) - Jonathan -Original Message- From: Matt Rudderham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Could you look at this PHP/MySQL Code? Hi, This is generating an error: Warning: Wrong parameter count for mysql_result() in /usr/local/www/html/matt/add.php on line 27 I can't figure out what the problem is, here is the code in question, it is part of an HTML form: --Snip connect etc.. -- // process form $sql = INSERT INTO members (first,last,position,organization,address,postal_code,county,phone,fax,e mail,website,member_type,on_directory,on_website,description,active,expi re_date) VALUES ('$first','$last','$position','$organization','$address','$postal_code', '$county','$phone','$fax','$email','$website', '$member_type','$on_directory','$on_website','$description','$active','$ expire_date'); $result = mysql_query($sql); echo Member Added\n; $sql2 = select max(member_id) from members; $member_id = mysql_query($sql2); echo $member_id; $sql3 = INSERT INTO skills (member_id, name, schooling, certifications, description) VALUES ('$member_id','$skill_name','$schooling','$certifications','$skill_descr iption'); $result = mysql_result($sql3); echo $result; ? Thanks very much Matt Rudderham Bonum volens duceris in Tartarum - 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: PHP memory problem
This sounds like it could be a caching issue. Are you running a Windows or UNIX-based machine? Each should have methods to track what processes are using memory and how much memory they are using. - Jonathan -Original Message- From: Dan Liu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 11:33 AM To: Subject: PHP memory problem Hi everyone, when we execute queries through MySQL using PHP, a significant amount of memory is being used in the process. We have noticed that the memory is not being released again for several hours. Despite attempts to force it to release memory in the code, the problem is still occuring. Does anyone know anything about why this behavior may be occuring and any solutions we could try? Is this a PHP problem or a MySQL problem? Using pconnect versus connect does not appear to be the problem. Dan - 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: [PHP] Performance
My first guess is that you have a problem with MySQL restarting frequently. If you have a bunch of problems, it might restart in the middle of a script... Try turning on logging on the MySQL server and see if it's restarting frequently. Second guess would be that there was a problem with either the MySQL version or the PHP version or perhaps both. Perhaps PHP tried to optimize performance by sharing MySQL connections or something... Either way - make sure you have the latest and greatest versions of both. - Jonathan -Original Message- From: Ron Jamison [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 3:00 PM To: markus|lervik Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Performance When working with normal connections i.e. non-persistent months ago, using what must've been PHP 4.0.1 or .2, I had some similar experiences. In a number of my more lengthy scripts I was seeing MySQL connections closing on me before the script was done executing. Thus PHP would spit out errors about not having a connection and to ensure it worked I was having to repeatedly call mysql_connect(). I wouldn't doubt the same thing is what Markus is seeing. In these cases, using persistent connections solved the problem for me. -Original Message- From: markus|lervik [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 2:16 PM To: Fournier Jocelyn [Presence-PC] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Performance On Thu, 2001-12-13 at 23:56, Fournier Jocelyn [Presence-PC] wrote: Hi, You absolutely don't have to reconnect to the database each time a PHP-block ends ! (it would be completely awfull !!). Don't you forget to specify the mysql link in you 'mysql_query' ?? Nope, I always specify the mysql link in my queries. But the problem remains. As I'm at home for the moment, I can't try out all the suggestions, but I have tried the p_connect, and it most certanly didn't work. I'll have to try to pinpoint the problem more closely tomorrow at work. It just might be (came to think of it now), that php closes the connection every time I use a submit-button and it reloads the page. Technically speaking, that would be ending a script, right? -Markus -- Markus Lervik Linux administrator with a kungfoo grip Vasa City Library - Public Library - 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: Changing location of database files
You should be able to change the data-dir variable in your /etc/my.cnf file. If the file isn't there, you can either create it or use a premade one and fine-tune it. If the datadir variable isn't in the my.cnf, you can add it. Read the first two parts of this chapter (they're short) for a few more details: http://www.mysql.com/doc/C/o/Configuring_MySQL.html - Jonathan -Original Message- From: Alexander Shaw [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 8:29 AM To: MySQL List Subject: Changing location of database files I've tried searching for the file that gives the location of the database directory, but am unable to find it. Without physically altering that directory is there any other way of changing the location of the database directory? Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.306 / Virus Database: 166 - Release Date: 04/12/2001 - 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: Table Exists
If you're using PHP, there should be a function for it. You can also use IF NOT EXISTS in your table commands like: CREATE TABLE IF NOT EXISTS, so that you don't overwrite anything. What also might come in handy here is either SHOW TABLES (provided you're in the right database), or DESCRIBE tablename - Jonathan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 8:34 AM To: [EMAIL PROTECTED] Subject: Table Exists What is the easiest way to check if a table exists in the current database? I checked the documentation, and couldn't find anything (but maybe I missed it). Glen - 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: Changing location of database files
If you use a premade one - maybe... but if you create one from scratch with only the datadir variable, then it shouldn't. But if you create one from scratch, at least print out a premade one and make sure you create it correctly. You may also want to examine the command you use to start MySQL. It might have the data-dir variable already set. Most people start it with either safe_mysqld or by using a startup script like mysql-server.sh. You might try modifying those... - Jonathan -Original Message- From: Alexander Shaw [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 9:03 AM To: MySQL List Subject: RE: Changing location of database files Jonathon wrote: You should be able to change the data-dir variable in your /etc/my.cnf file. If the file isn't there, you can either create it or use a premade one and fine-tune it. If the datadir variable isn't in the my.cnf, you can add it. Only problem is that the server is up and running perfectly but there is no sign of a my.cnf file anywhere. Will just adding one into /etc cause problems? Alex --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.306 / Virus Database: 166 - Release Date: 04/12/2001 - 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: [PHP] Performance
It must be a joke. I program in PHP day in and day out - PHP and MySQL literally make up about 80% of my day, and I KNOW that PHP does NOT drop the MySQL connection at the end of every PHP block, unless you specifically tell it to close the connection each time. Instead, it normally will shut down the connection at the end of the SCRIPT, not the block. You are correct in saying that it would be a joke - a cruel and slow joke if MySQL had to reconnect each time. You should only have to connect at the top of your script, and then you can run as many queries as you'd like until the script ends. - Jonathan -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 1:13 PM To: markus|lervik Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Performance what?? that is a joke? I mean disconnectiong at every single little block ending? I just can't beleive it, probably you can put that in an inc file for connection, call the connect at the beginning of the script, and call disconnection at the end. It's impossible that you have to reconnect each time you want to prepare/execute something! I'm only coding perl so I don't know php at all, but I'm sure you can stay connected for at least all the time the same script is running... so many websites uses mysql/php... Etienne markus|lervik wrote: On Thu, 2001-12-13 at 22:16, Ron Jamison wrote: I'm fairly sure there's no difference in performance when using PHP tags mixed with HTML blocks as you are doing. Think of it as PHP knowing that it should send everything not in ? ? tags directly to the browser. Like an echo or a print, but without needing to specify calls to those functions. HTML ? echo $PHP_SELF ? /HTML HTML ?=$PHP_SELF? /HTML I'm not -that- worried about performance loss for switching between, php and html, what annoys me (and would probably slow down performance quite a bit), is that every time I have to do a database query, I have to use mysql_connect again, because as Prottoss pointed out, PHP drops the connection every time a PHP-block ends. Not that it is that a big issue for my particular application, but knowing a workaround to this problem would be quite useful in the future. Cheers, Markus -- Markus Lervik Linux administrator with a kungfoo grip Vasa City Library - Public Library - 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 -- Etienne Marcotte Specifications Management - Quality Control Imperial Tobacco Ltd. - Montreal (Qc) Canada 514.932.6161 x.4001 - 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: Database Syncronization
If you use PHP, you can use my utility dbUtils at http://php.sitecreative.com - it has functions for synchronizing databases. - Jonathan -Original Message- From: Ananth Rajaraman [mailto:[EMAIL PROTECTED]] Sent: Monday, December 10, 2001 2:17 AM To: [EMAIL PROTECTED] Subject: Database Syncronization Hi I have a similar database on the local and remote server. I want to syncronize the two. Please Help Ananth __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.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 - 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 running under WIN98
I suggest installing FoxServ, which installs a combination of Apache, PHP, and MySQL. Does it without a hitch. Great for development systems. - Jonathan -Original Message- From: Dan Wolfe [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 6:24 PM To: [EMAIL PROTECTED] Subject: MYSQL running under WIN98 After installing mysql specifying nothing but defaults, I started mysql without any parameters and then ran MYSQL TEST and received the following error message: Can't connect to mysql server or localhost (10061). Any suggestions? - 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: PASSWORD() question
No - instead, update the password with a new, random one, and e-mail the random one to the user. - Jonathan -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001 1:37 PM To: MySQL List Subject: PASSWORD() question Hello, I have some usernames and passwords. The passwords have had the PASSWORD() function used on them. I need to set up an area of a site to allow users to have their passwords e-mailed to them. I can't just say SELECT password FROM table WHERE email='$email' AND username='$username' because that will give me a bunch of gibberish. Is there anyway to get the password back into plaintext to be emailed to the user? Thanks, Tyler Longren - 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: Netscape ignores %20 with $sort=id DESC
Try adding a line right below $sort: $sort = urlencode($sort); It should add the %20s for you. - Jonathan -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 8:35 PM To: Paul Markov Cc: [EMAIL PROTECTED] Subject: RE: Netscape ignores %20 with $sort=id DESC On 02-Dec-2001 Paul Markov wrote: Hi, some users of my web are having problems with sorting a MySQL table because older versions of Netscape do not recognize a blank space and do not convert it into a %20. Here's my situation: $sort = id DESC if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a Netscape drops DESC because it can't convert the blank space into a %20. (this works fine with newer versions of Netscape. Internet Explorer does not have such a problem). Is there a workaround for this problem? The '%20' is correct by current standards. For backwards compatibilty, you can try a plus sign 'id+DESC' (be aware that this is now the wrong way to do it). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) - 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: Changing data
Try this query: UPDATE table SET phone = concat((,left(phone,3),) ,mid(phone,3,3),-,mid(phone,6,4)); It should convert 00 to (000) 000-. Take a look at this page if you want details on how it works: http://www.mysql.com/doc/S/t/String_functions.html - Jonathan -Original Message- From: Gill, Vern [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:23 AM To: '[EMAIL PROTECTED]' Subject: Changing data how would I change in all rows data that is; 00 to 000-000- or (000) 000- Can this even be done with mysql? Thank you in advance... Vern H. Gill State Director Director of Marketing Conejo Valley Jaycees http://www.conejovalleyjaycees.org - 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: Netscape ignores %20 with $sort=id DESC
This isn't the same piece of code, either. The code you posted was for creating a piece of HTML code for an A HREF=... containing the variable $sort. The code you're showing us now is for a MySQL query. MySQL is looking for the characters %20, not a space, in the field you're searching through. That's why the query comes up empty. So, basically you would do this: if ($sort == ) {$sort = id DESC;} $querystring = $querystring. ORDER BY $sort; $result = mysql_query($querystring;,$link); $num_rows = mysql_num_rows($result); $sort = urlencode($sort); if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a The %20 will only appear in the link, not in the query. - Jonathan -Original Message- From: Paul Markov [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 8:56 AM To: Jonathan Hilgeman; 'Don Read' Subject: Re: Netscape ignores %20 with $sort=id DESC Jonathan, Thanks for the tip... I thought it was going to work, but I got this error: Supplied argument is not a valid MySQL result resource in (point exactly at $sort = urlencode($sort); ) By just using id+DESC I also get the Supplied argument is not a valid MySQL result resource . Here's a little more of the code - anything to do with the { } brackets? if ($sort == ) {$sort = id DESC;} $sort = urlencode($sort); $querystring = $querystring. ORDER BY $sort; $result = mysql_query($querystring;,$link); $num_rows = mysql_num_rows($result); Thanks again for your help! Paul. - Original Message - From: Jonathan Hilgeman [EMAIL PROTECTED] To: 'Don Read' [EMAIL PROTECTED]; Paul Markov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, December 03, 2001 11:17 AM Subject: RE: Netscape ignores %20 with $sort=id DESC Try adding a line right below $sort: $sort = urlencode($sort); It should add the %20s for you. - Jonathan -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 8:35 PM To: Paul Markov Cc: [EMAIL PROTECTED] Subject: RE: Netscape ignores %20 with $sort=id DESC On 02-Dec-2001 Paul Markov wrote: Hi, some users of my web are having problems with sorting a MySQL table because older versions of Netscape do not recognize a blank space and do not convert it into a %20. Here's my situation: $sort = id DESC if ($page_num != $total_num_page){print a ref=\./propview.php?$guidestringcur_page=$nextpagesort=$sort\Next Page/a Netscape drops DESC because it can't convert the blank space into a %20. (this works fine with newer versions of Netscape. Internet Explorer does not have such a problem). Is there a workaround for this problem? The '%20' is correct by current standards. For backwards compatibilty, you can try a plus sign 'id+DESC' (be aware that this is now the wrong way to do it). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) - 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
SQL dump
Just wondering if there's a built-in or distribution utility that comes with MySQL (like mysqlhotcopy) that will output a file with SQL commands to recreate a database. phpMyAdmin has a tool for doing this but I don't know if there's something else built-in already that has that functionality. - Jonathan - 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 Problems - Still Rebooting
Please please please take the time to look at this problem. I'm running MySQL 3.23.36 on FreeBSD 4.2. The only application that connects and manipulates MySQL is a single PHP application running on PHP 4.0.3. I've eliminated all the errors I can think of and tried to optimize all queries. CPU usage never goes about 10-20% tops. However, MySQL continues to restart randomly and I cannot detect a pattern. And each time it restarts, it appears as though it doesn't close the socket or something. If I run netstat on my machine, I see this near the bottom: Address Type Recv-Q Send-QInode Conn Refs Nextref Addr d56998c0 stream 0 0 d5a12d40000 /tmp/mysql.sock d5888680 stream 0 0 d5695900000 /var/run/ndc d5920f40 stream 0 00000 /tmp/mysql.sock d5699e80 stream 0 00000 /tmp/mysql.sock d5888f80 stream 0 00000 /tmp/mysql.sock d5699880 stream 0 00000 /tmp/mysql.sock d5920e00 stream 0 00000 /tmp/mysql.sock d5920340 stream 0 00000 /tmp/mysql.sock d5699280 stream 0 00000 /tmp/mysql.sock d5888280 stream 0 00000 /tmp/mysql.sock d5920b40 stream 0 00000 /tmp/mysql.sock That list of mysql.sock entries continues to grow slowly until I start getting errors about sockets. I can't JUST shut down MySQL and start it up again - the sockets stay there. I have to reboot the whole server to make the socket entries go away. There are no specific errors in the error log file - only mysql got signal 11 and it says something about checking the backtrace but it doesn't give me the actual backtrace data - just a message saying that I should check it. The binary logs don't hold any clues either. There's no pattern in the last queries before or beginning queries after the mySQL server restarts. They change each time. Help help help help help. - Jonathan - 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
2 Articles on Threads and Joins?
I'm basically looking for two things: 1) An article/tutorial/document discussing operating system threads. I keep hearing about LinuxThreads on FreeBSD, and how MySQL won't run correctly with pthreads or something like that. I need to learn about threads and when and where they're used or not used, and why. Anyone have a good beginner's tutorial for that? 2) The other one I'm looking for is on joins. I've always used LEFT JOIN for joining tables, but I know there's INNER JOIN, OUTER JOIN, RIGHT JOIN, and JOIN, probably among others, and I don't know the functional differences. I couldn't find a page on it in the MySQL docs, but if it's there, can someone point me to it? Or maybe an article on it? Thanks. - Jonathan - 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
Large Unique Rows
I know this is a really simple thing that I'm just missing. Basically I want to store Apache logs in a mySQL database, in a table with 9 fields. I want each entry to be completely unique via all 9 fields. So, if fields 1-8 in a new record are all identical to fields 1-8 in an existing record, but field 9 is different, then the new record should be insertable. The only time a record should come back with a duplicate entry error is if all 9 fields are the same. How do I go about doing this? I tried a UNIQUE combination key of all 9 fields, but the key was too big and was limited to 500 in size. Thoughts anyone? - Jonathan - 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 - Got Signal 11 - UPDATE
Hello All, I believe I've found a reason for and a fix to a problem I've been experiencing for some time now. My MySQL server has been restarting frequently - once, twice, even three times a day for the past few months. If I shutdown MySQL and run myisamchk on the tables, I'd get: myisamchk: MyISAM file database/table.MYI myisamchk: warning: ## clients is using or hasn't closed the table properly Where ## could be anywhere from 1 to 2000, and this happened on almost every table. Looking at the error log, I also saw a lot of these: 011127 8:36:27 Aborted connection 5992 to db: 'database' user: 'root' host: `localhost' (Got an error reading communication packets) Usually happening every few minutes. After about 3-4 of them, the error log would say that mySQL suddenly got signal 11 and would restart without warning. The box was used exclusively for a large, cumbersome PHP application. The PHP application periodically restarts Apache for changes to its configuration file to take effect. This is where the problems all stem from. The PHP runs a sudo command to apachectl restart. When someone was surfing some of the hosted sites using MySQL, and Apache just restarted immediately, the PHP would not reach the end of its script and terminate its connection to MySQL. So, after a while, these dead connections accumulated, tables weren't being closed properly, and there were frequent errors when browsing the sites. I believe this caused corrupted indexes, and MySQL would attempt to restart. I changed the PHP-Sudo command to run apachectl graceful instead, allowing PHP scripts to finish completely and close their connections correctly. Since this morning, when this change was made, I have not had a single error for a couple hours. In the past, I would be expecting errors at least every few minutes. Now, here's ANOTHER possible problem that we fixed. We noticed that if there was a high CPU usage (99-100%), MySQL would restart about every 15 seconds. We also noticed that there were some queries that were not defined as being slow but they DID take up 50-60% CPU every time the queries were run. We looked at the tables, noticed that there were some useless indexes, and re-indexed one of our main tables, and now, MySQL remains below 12% at all times - usually below 2%. The pages load faster and MySQL is generally a lot faster overall. The trick was simply to index columns used frequently in WHERE conditions in queries. My two cents - hope it helps someone. - Jonathan - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Recursive select to produce hierarchical listing
Not sure if you're using PHP to manipulate MySQL or not, but if so, I had the same problem and found the answer from someone on PHPBuilder, and then I mirrored the answer on my site here: http://php.sitecreative.com/faq.php#3 Hope it helps. - Jonathan -Original Message- From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 2:43 PM To: Michael Collins Cc: [EMAIL PROTECTED] Subject: Re: Recursive select to produce hierarchical listing Hi. Maybe I am missing something, but won't SELECT M1.*,M2.* FROM Menu AS M1 JOIN Menu AS M2 ON M1.ID = M2.ParentID WHEREID=0 ORDER BY M1.Index, M2.Index work? Bye, Benjamin. On Tue, Nov 20, 2001 at 06:04:11PM -0800, [EMAIL PROTECTED] wrote: I am trying to display a hierarchically related list of folders via a recursive SQL statement (each row in a table represents a folder). What is needed is a select that will sort the folders and associate the parent folder with their child, sub-folders. The kicker is that the items in the folder need to be maintained in a specific order. An exanple: A] Mailbox 1) Folder A a - A sent b - A store c - A hold [...] Anyone have insight on how this may be accomplished? Here is one attempt at it but no luck so far: SELECT M1.*,M2.* FROM Menu AS M1 JOIN Menu AS M2 ON M1.ID = M2.ParentID WHERE ID=0; Full table definition dump below: CREATE TABLE Menu ( ID smallint(6) NOT NULL auto_increment, Index tinyint(4) NOT NULL default '0', ParentID smallint(6) NOT NULL default '0', FolderName varchar(32) default NULL, Level smallint(6) NOT NULL default '1', PRIMARY KEY (ID) ); Index is the order in which an item appears within a folder. Level is the level at which the folder is located, this makes it easier to indent the items in a folder. [...] -- [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 - 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
Can't Create UNIX socket
I keep getting this error randomly when trying to connect to the MySQL server: Can't create UNIX socket (55) It happens when trying to connect either through PHP or via the shell (mysql command). I haven't had this problem before - any thoughts? It only happens temporarily, and then resumes working immediately. I'm on FreeBSD 4.4. If I get the error when using mysql in a telnet shell, I see: ERROR 2001: Can't create UNIX socket (55) When getting the error via PHP, it's slightly different, but basically says the same thing about unable to create UNIX socket (55) - Jonathan - 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
FLUSH TABLES
If I use a FLUSH TABLES command, what will happen to others that might be in the middle of using a table? I have a PHP application running on PHP 4.0.3 that doesn't seem to close tables properly, and I am constantly having trouble with the mySQL server crashing on me. I shut down the server, ran myisamchk on all tables, and I had a range of messages from: myisamchk: warning: 1 clients is using or hasn't closed the table properly to myisamchk: warning: 185 clients is using or hasn't closed the table properly ...depending on the table. But almost every table had at least 1 of these messages And I know that those tables are not in use at the time. So I'm thinking that it might be good to add a FLUSH TABLES command to the bottom of every page that uses mySQL. But this means that FLUSH TABLES would be run at least about 5-10 times each minute. Is that going to burden the server? - Jonathan - 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: Nusphere is spamming me
What a shameless plug. Given other questions, I'll provide a quick update on NuSphere. Our product line has been expanding recently and we are pleased to - Jonathan Speaking of green eggs and ham, that is the breakfast of choice for our developers - the ones who made our new product: NuSense. -Original Message- From: Britt Johnston [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 1:48 PM To: Michael A. Peters Cc: [EMAIL PROTECTED] Subject: RE: Nusphere is spamming me Michael, et al: I want to assure everyone that there is no attempt to spam anyone on this email list, this email list is a valuable community service and not to be abused. Regardless, I'm sorry that anyone even has that impression. If you have any concerns after reading this please feel free to contact me directly. Any email NuSphere sends directly is to email addresses entered by individuals themselves registering at www.nusphere.com which thousands do every week. There is no other way to get a name into our database. All emails should provide clear instruction on how to be removed from the mailing list if desired. While there were some creative suggestions in the other messages in this thread, none are being used by NuSphere. In Michael's specific case the address that you received email from I believe is not the address you have registered at our site, so perhaps you are forwarding mail from another account to your new account? If you send me the specific email I can further double check our records and we can determine where it came from. NuSphere also has other marketing programs including a worldwide seminar series and as part of presenting that series we do work with well known publishers in specific geographic areas to promote the seminar and that may include both paper and electronic mail to their readers. It is possible some of you might have seen these emails as well - they are not directly from NuSphere. Given other questions, I'll provide a quick update on NuSphere. Our product line has been expanding recently and we are pleased to now provide the leading PHP IDE - NuSphere PHPEd - which won Best Developer Tool award from LinuxWorld and was popular at the recent 2001 International PHP Conference in Frankfurt. NuSphere is focused on providing a complete software platform for building applications which is based on a solid foundation of open source technology - MySQL being one part. Our most popular product is NuSphere Pro Advantage which appeals to those users who want a complete integrated platform for building and deploying applications - it might not be appealing to the experts that read this list, but people that ask you to setup a system for them probably would benefit from the approach. See the following for more info: http://nusphere.com/releases/083001.htm BTW, our seminar series is in the UK next week for more info see the following: http://nusphere.com/education/class.php?id=48 In the future, please do not hesitate to contact me directly with any concerns. Sincerely, Britt... -- D. Britton Johnston 603-578-6707 Nashua Chief Technology Officer 781-280-4954 Bedford NuSphere Corporation 781-280-4600 Main 14 Oak Park 781-280-4646 Fax Bedford, MA 01730 www.nusphere.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 - 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] Access to MYSQL via ODBC?
The best way I've found to convert MS Access to mySQL is via ODBC. 1. Just set up ODBC on Windows (an easy install process - just run the install program that you can download from MS) 2. Install MyODBC (you can download this from MySQL's site - somewhere in their downloads section) 3. Go into Control Panel--ODBC. 4. Set up a new ODBC connection using the mySQL driver and have it connect to your MySQL database. 5. Open up your Access database, and go to the File menu, and choose to Export your tables. 6. In the drop-down list of exportable formats, you can find ODBC Datasource at the very bottom. Choose that and you'll be able to select the MySQL ODBC connection you set up. From there, exporting can take merely seconds to fully reconstruct a whole table with data. Microsoft did a pretty good job on this one. - Jonathan -Original Message- From: mweb [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 7:45 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Access to MYSQL via ODBC? GREAT, THANK YOU! Now the only step left is how to convert (on Linux) the MS access database to MySQL...How? mweb -- Initial message --- From: Andrew Hill [EMAIL PROTECTED] To : mweb [EMAIL PROTECTED], phplist [EMAIL PROTECTED], mysqllist [EMAIL PROTECTED] Cc : Date: Tue, 13 Nov 2001 10:27:15 -0500 Subject : RE: [PHP] Access to MYSQL via ODBC? Sure, this is entirely possible. Configure PHP --with-iodbc as per the HOWTO at www.iodbc.org and then install the MyODBC driver. - 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
Lots of Aborted Connections and Signal 11s
I run PHP 4.0.3 and MySQL 3.23.32. I get a fair amount of traffic and host about 1000 very small sites on a fairly fast server with plenty of RAM and space. However, it keeps shutting down frequently and every time it shuts down, the binary log files rotate, and someone will probably try to access the database while it's down and they'll get an error. Here's a clip from my error log that seems to be repeated over and over and over again, just at different times: BEGIN SNIPPET 011109 7:27:33 Aborted connection 13073 to db: 'site_info' user: 'root' host: `localhost' (Got an error reading communication packets) 011109 7:59:00 Aborted connection 13081 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicat ion packets) 011109 7:59:00 Aborted connection 13080 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicat ion packets) mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died. 011109 08:20:45 mysqld restarted /usr/local/mysql/libexec/mysqld: ready for connections 011109 8:57:31 Aborted connection 1622 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) 011109 8:57:31 Aborted connection 1654 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) 011109 8:57:31 Aborted connection 1806 to db: 'site_users' user: 'root' host: `localhost' (Got an error reading communi cation packets) 011109 8:59:00 Aborted connection 1817 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died. 011109 09:01:37 mysqld restarted /usr/local/mysql/libexec/mysqld: ready for connections END SNIPPET Any ideas, anyone? I don't use persistent connections, by the way. There's only one page that does use them, and it is accessed about once every couple months. It is not part of the main sites that everyone surfs. - Jonathan - 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: primary key based on unique value for two columns
You can't use a primary key for that, but you CAN make a unique two-column key: ALTER TABLE MyTable ADD UNIQUE MyNewIndex (Column1,Column2) - Jonathan -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:37 AM To: [EMAIL PROTECTED] Subject: primary key based on unique value for two columns I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column and not on a combination of columns. If I am wrong please correct me. I am looking for work arounds. I have thought of one. That would be to concatenate the columns and use a field terminator such as a - to separate the values or (columns) in the single column. Then you could use string functions to parse the columns. Ex: For column 1 in concatenated column left( ColumnName, (instr( ColumnName, '-') - 1) ) For column 2 in concatenated column Substr (ColumName, (instr ( ColumnName, '-') + 1) , length(ColumnName)- (instr ( ColumnName, '-') + 1) ) Is there any other way to do this? - 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: primary key based on unique value for two columns
I have not tested this with the primary key - my previous suggestion went off the logic in my head at the time (most likely not a good thing, since I'm tired right now), but I have a feeling Bill here is probably correct if he says it's possible with the primary key as well. I stand corrected. - Jonathan -Original Message- From: Bill Adams [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 11:05 AM To: Brendin Cc: [EMAIL PROTECTED] Subject: Re: primary key based on unique value for two columns Brendin wrote: I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column and not on a combination of columns. If I am wrong please correct me. At least in 3.23.x (x?) and higher you CAN have a primary key on multiple columns. I am looking for work arounds. I have thought of one. That would be to concatenate the columns and use a field terminator such as a - to separate the values or (columns) in the single column. Then you could use string functions to parse the columns. Ex: [snip] There is a maximum key lenth so if you have two char(255) columns you might need to do something like: ALTER TABLE table ADD PRIMARY KEY( char_col1(100), char_col2(100)); However, this also means that the combination of the first 100 chars from each column must be unique. b. - 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
Lots of Aborted Connections and Signal 11s
I run PHP 4.0.3 and MySQL 3.23.32. I get a fair amount of traffic and host about 1000 very small sites on a fairly fast server with plenty of RAM and space. However, it keeps shutting down frequently and every time it shuts down, the binary log files rotate, and someone will probably try to access the database while it's down and they'll get an error. Here's a clip from my error log that seems to be repeated over and over and over again, just at different times: BEGIN SNIPPET 011109 7:27:33 Aborted connection 13073 to db: 'site_info' user: 'root' host: `localhost' (Got an error reading communication packets) 011109 7:59:00 Aborted connection 13081 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicat ion packets) 011109 7:59:00 Aborted connection 13080 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicat ion packets) mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died. 011109 08:20:45 mysqld restarted /usr/local/mysql/libexec/mysqld: ready for connections 011109 8:57:31 Aborted connection 1622 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) 011109 8:57:31 Aborted connection 1654 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) 011109 8:57:31 Aborted connection 1806 to db: 'site_users' user: 'root' host: `localhost' (Got an error reading communi cation packets) 011109 8:59:00 Aborted connection 1817 to db: 'site_mails' user: 'root' host: `localhost' (Got an error reading communicati on packets) mysqld got signal 11; The manual section 'Debugging a MySQL server' tells you how to use a stack trace and/or the core file to produce a readable backtrace that may help in finding out why mysqld died. 011109 09:01:37 mysqld restarted /usr/local/mysql/libexec/mysqld: ready for connections END SNIPPET Any ideas, anyone? I don't use persistent connections, by the way. There's only one page that does use them, and it is accessed about once every couple months. It is not part of the main sites that everyone surfs. - Jonathan - 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: just found out this list is being published on the web
Not that I don't understand your viewpoint, but you have to realize that almost any and every mailing list is published in more than one place. Any person who posts to this list is knowingly publishing to an unknown audience. I find it odd that you are comfortable with publishing to one unknown audience but are not comfortable when it is published to another audience. Now, who says dbforums.com is a commercial operation? The only thing I see is a banner ad at the top of the pages, and some webmasters put up banner ads just to try to compensate for the price of hosting in order to provide a service. I can reason with your concern about your e-mail addresses being available. That is why many people have fake e-mail addresses to use when posting. Live and learn. Bottom line is - if you're ever subscribed to a mailing list, you should know first-hand that you are publishing your writing to the Internet. Once it's out there, it's up for grabs by anyone who wants to use it almost any way they want to. - Jonathan -Original Message- From: Robert Alexander [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: just found out this list is being published on the web Hi all, I just found out, while looking for other things, that what seems to be the entire content of the MySQL list is being published on the web. I, for one, really don't like this idea. I have a reasonable expectation that what I post here is for viewing by subscribers to this list, the MySQL community, not the whole world. I realize that a mailing list is not *real* private -- anyone can subscribe, after all -- but I sure don't like discovering, for example, my personal email addresses on web pages that are available to spambots. The site in question is http://dbforums.com. Try, for example, http://dbforums.com/t147187.html I certainly haven't consented to my personal speech and writing being used as a commercial operation's content. I don't consider publishing my writing on a public web page without my knowledge or consent to be fair use. I'm not talking about a searchable mailing list archive; that is certainly reasonable fair use. A searchable archive creates pages on demand for the person requesting them, and doesn't leave them on the web to be found by search engines and 'bots. Dear MySQL folks, Have you given permission to dbforums.com to publish the content of this list? Thanks everyone. Best, /Rob - 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: Server + database on a CD??
Jeremy is correct. I've done it before - but if possible, it is better to have a program that copies the databases to a writable storage disk like the hard drive or a network drive, in case you want to update it later (you don't have to burn a new CD every time) - Jonathan -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 10:19 AM To: Jean-Louis Leroy Cc: [EMAIL PROTECTED] Subject: Re: Server + database on a CD?? On Mon, Oct 22, 2001 at 11:23:50AM +0200, Jean-Louis Leroy wrote: Is it feasible to make mysql run from a CD and have it access databases stored on the CD? TIA... It is. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 46 days, processed 1,018,044,051 queries (253/sec. avg) - 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: MS Access to MySQL conversion? How?
The Jonathan Tutorial Access -2- MySQL in 8 Not-Extremely-Easy-But-Not-Hard Steps 1. Go to mysql.com 2. Download and install MyODBC 3. Set up a new ODBC connection for the new mySQL server 4. Open up the database in access 5. Go to the File menu and choose to Export (Tables?) 6. At the bottom of the list of available formats to export to, there should be an ODBC data source or something to that effect. 7. You should be able to find the new ODBC connection you set up in step 3 using the dialog boxes that pop up. 8. Press OK and presto - your entire Access table structures and data are now in mySQL. Congratulations. - Jonathan -Original Message- From: Todd Williamsen [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 2:12 PM To: [EMAIL PROTECTED] Subject: MS Access to MySQL conversion? How? I am new to this fast database and love MySQL, but I need to know how to import or convert Access database to MySQL. ANyone know how I would go about that? Also this is for a web site and I need to change the asp code to PHP. Its not a lot, only a few pages, but its a headache for someone that has never done it before Thank you, Todd Williamsen, MCSE home: 847.265.4692 Cell: 847.867.9427 - 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 COMPANY RELEASES A NON-FINAL VERSION OF SOME PRODUCT NON-PREMIUM EDITION
The harm doesn't come from you offering something beneficial to the MySQL community. It comes when you abuse the privileges of being on this list and send spam. While there may not be anything in stone that says not to send commercial software advertisements, you should know better. The only thing that keeps spam from filling up the mailing lists is a slight sense of ethical marketing behavior, and some people don't have that. cough, cough If your product is that great, then you should be able to advertise the normal ways (i.e. banner ads) and get overwhelming responses to them. If you need to even ask where to begin with banner ads, then you should be studying marketing and advertising, not sending out this stuff. To anyone else that is doing or even contemplating doing something annoying: People are only on this list to help and be helped. If you KNOW that what you're sending out is going to bug someone else on the list, then don't send it. - Jonathan -Original Message- From: Cathy Cunningham (Blue World Lasso Evangelist) [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 6:53 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: BLUE WORLD RELEASES BETA VERSION OF LASSO PROFESSIONAL 5STANDARD EDITION At 11:06 PM -0500 10/17/01, David Dahl wrote: WOW, now you can BUY MySQL from blueworld and run it on MacOS X and Windows 2000 only, or you can download the source code from MySQL and run it anywhere for free... hmmm... sounds great:) Bill Adams writes: Seriously, is there a better forum for announcing commerical products like this? Perhaps on the portal secion of the mysql.com site? Or somewhere else? Abusing other instead of spending money on marketing is not a very nice thing to do. And if all-caps are needed to sell the product it probably shouldn't be sold at all. The say that you can't blame someone for trying, but if that really depends on what the person is trying to do. Sorry if this came out as a pointless rant. I just got back from the pub. Sorry some of you find my use of all caps upsetting (I was simply copying the subject line from our PR, which like many uses all caps strictly as a convention in order for the subject to clearly stand out from the rest of the message). I'll be careful not to do that again here. Also sorry that some object to commercial software manufacturers actually trying to inform people of what they have to offer to the MySQL community here. We do cordially invite all of you to check out what we have to provide. We do believe we have something of considerable value, even to those who feel they can get comparable software for free. We simply believe we've got something better than PHP, JSP, ASP and ColdFusion. And, with MySQL built-in, it makes it very easy for folks who have yet to try MySQL to get going with it quick and easy. We've licensed MySQL from MySQL AB, and, every unit of Lasso Professional 5 Standard Edition that we sell puts money in the pocket of MySQL AB. They are a business after all and need and appreciate revenue from software manufacturers who work with them within the confines of their embedded software licensing, distribution and trademark agreements. I'm sure they don't want to see the MySQL community negatively react to any commercial software provider who tries to sell a version of MySQL as a value-added component of their product. Hopefully many of you see this as a good thing which is good for MySQL AB and the MySQL community. We're also bringing MySQL to markets in which it doesn't have yet as strong a presence. We also hope some of you see this as a good thing for the whole MySQL community. Lastly, we're strong supporters of MySQL and and the company behind it, namely MySQL AB. In fact, we've contributed an affidavit to assist them with the legal wranglings their going through with NuSphere. So, please, cut us--and any other well-meaning company who simply is trying to run their business--some slack. In the end, if some of us earn some money while supporting the MySQL community and in turn we can share some of that with the company who started it all--namely, MySQL AB--then, I don't see how or why that's such a bad thing. And lastly, for those who have inquired privately, while Lasso Professional 5 is available currently just on Windows 2000 and Mac OS X 10.1, we are planning a release for Red Hat Linux (Intel) soon. We currently provide a free version of Lasso for Linux, e.g. Lasso Lite 3.6.5. We'll also have a free lite version of Lasso Professional 5 available on all platforms it supports. Thanks for allowing me to chime in an explain things a bit. CC -- - Cathy Cunningham [EMAIL PROTECTED] Lasso Evangelist Blue World Communications, Inc. http://www.blueworld.com/ - Lasso Studio is the easiest
RE: A COMPANY RELEASES A NON-FINAL VERSION OF SOME PRODUCT NON-PREMIUM EDITION
Eric, That's nice and all that you can have an extra tool to use because of spam - I mean, they ARE real products. Most people consider TV infomercials to be useless, but some people find use out of them. The problem is that it's annoying to see these types of advertisements. The reason you don't see dozens of these emails is because there are people out there with ethical standards regarding their advertising or at least respect the primary function of the mailing list. If we say its okay, then that will only encourage someone later to think, Well THEY did it, so I should be able to do it, too. This is not an invalid slippery-slope fallacy - it has happened before. As someone else posted, if someone asks a question such as, I need to get this and this done, how can I do it? and someone has a product that they KNOW will do the job, then it should be okay to post an advertisement. But if you can work efficiently right now without a product, then you should not need to be harassed with e-mails to buy more. I have plenty of little programs that I could plug this mailing list with, and I know a lot of people would find functionality in them, but if someone posts a message saying that they are having this and this problem, then I respond privately to them with the solution. If I create the next phpMyAdmin or some popular program like that, then I won't need to send advertisements to a mailing list. Whoever I responded privately to will refer others word-of-mouth if it helped them. - Jonathan -Original Message- From: Eric Frazier [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 10:41 AM To: Jonathan Hilgeman Cc: 'Cathy Cunningham (Blue World Lasso Evangelist)'; [EMAIL PROTECTED] Subject: RE: A COMPANY RELEASES A NON-FINAL VERSION OF SOME PRODUCT NON-PREMIUM EDITION Hi, This is complete crap. One of the tools I use is because of an email I saw on this list that might have been called spam. I say that this type of email is on topic. Maybe they could have eased up on the BS tone of the email, but I would still want to know about a new product. The only other question that comes up is would it be worthwhile to setup a mySQL announce list for 3rd party tools? I don't exactly see dozens of these types of email a day right now though. Eric At 08:44 AM 10/18/01 -0700, Jonathan Hilgeman wrote: The harm doesn't come from you offering something beneficial to the MySQL community. It comes when you abuse the privileges of being on this list and send spam. http://www.kwinternet.com/eric (250) 655 - 9513 - 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: very newbie insert question
I always use INSERT INTO table SET field1='value', field2='value', etc... If I don't specify fields like an auto-incrementing number, it is filled in automatically. - Jonathan -Original Message- From: sjs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 5:51 PM To: [EMAIL PROTECTED] Subject: very newbie insert question This is my first script, so I am sorry it is so newbie-ish. I think I have the correct script to open the connection, open the database and the table. However, I cannot get the insert into to work. I have read several online sources and books, all of which are slightly different. It is not a parse error. Can you help? Thanks SJS Script as follows: html headtitleAdding Your Record to the Database/title/head body center ?php if((!$lastName) || (!firstName) ||(!emailAddress)) { echo You have not entered all required informaton.br Please try again; exit; } $lastName=addslashes($lastName); $firstName=addslashes($firstName); $email_address=addslashes($email_address); @ $db=mysql_pconnect(, ,); if (!$db) { echo Couldn't connect to the database.brIf problem persists, please contact webmaster; exit; } $db= mysql_select_db(emailDB); if (!$db) { echo Sorry. Could not retrieve correct database.br If problem persists, please contact webmaster; } $sql = INSERT INTO email_addresses VALUES ('$lastName', '$firstName', '$email_address'); $result = mysql_query($sql); if (!$result) { echo pSorry.brYour address was not successfully added.brIf problem persists, please contact webmaster.; } else { echo pDONE DEAL!; } ? /body /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
Lots of restarts?
Hi People, I'm new to this list, so forgive me if I sound like a newbie. Anyhow, here's my issue... I have a script that notifies me when there are mySQL errors in one of my PHP scripts. Today I just got an error saying that MySQL server was gone. I checked it out and noticed that it was still up, but apparently it had restarted itself - the uptime was only 4 minutes. Then I noticed all the log files. MySQL is set to store all the queries in the binary log files. I figured I would get 1 big log, but I have about 70 in the past month, and some are blank except for an indication that the server is up at a certain time: # at 4 #010917 0:46:33 server id 1 Start: binlog v 1, server v 3.23.36-log created 010917 0:46:33 Now, what is the issue here? Are these log files getting created each time the server restarts? And if so, why would my server restart so much on its own? I have only restarted it once... - Jonathan --- What goes up, must come down. Ask any system administrator. - 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
Restarting mySQL as a daemon
I want to start logging all queries on a mySQL server, but it is already running. I would prefer not to shut it down, but if I have to, then I am not sure how to start it up again without binding it to my logged-in self, so that when I log out of the system, the program doesn't stop. Is there anyway to begin logging without stopping the server? - Jonathan - 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