like
I am trying to give MySQL a string and then compare it to a column. For example, say I have the string: helloworld, and I have a table with one column (keyword), and three records: low, 324, kda. I want to select the records that are found in the string (in this case, I want it to return low). I have tried the like comparison: select * from [table] where ([string] like [keyword]) but that only works if the string is exactly the same as the keyword. In this case, the string is longer. Normally, I would use %'s, but how do I do that with a column name? select * from [table] where ([string] like %[keyword]$) does not work. Am I way off track here? Is there a simple way to do this that I have somehow overlooked? Is there a complex way to do this that will at least get the job done? Thanks. -Antonio _ Get your FREE download of MSN Explorer at http://explorer.msn.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
Re: php/mysql question
Hello Adrian, Friday, June 08, 2001, 8:59:51 AM, you wrote: ADC Hi, ADC I am not sure whether this relates to this list or the (not working) php ADC list. ADC For simplicity: I have a form that displays data from a table. I will ADC take just one field that displays a name ADC input type=text name=name value=? echo $row[name];? ADC This allow a user to update the changes when the submit button is pressed. ADC On the next php file I do the following: ADC $tname =urldecode($name); ADC $tname1 = stripslashes($tname1); ADC $updtStmt = update vusers set orgname='$tname1' where id=$tid; Why do you use urldecode($name) and stripslashes($tname1)? What for? Why didn't you try code like this: $tname = AddSlashes($name); $updtStmt = update vusers set orgname='$tname' where id=$tid; If $name contains Adrian D'Costa, $updtStmt will contain update vusers set orgname='Adrian D\'Costa' where id=$tid and the query will be ok. 100% guarantee. ADC This works fine, but suppose in by table I have a name Adrian D'Costa ADC This starts all the problems. I copy the sql statement from the php file ADC and try: ADC update vusers set name='Adrian D'Costa' where id=3; ADC ' I get the ' prompt that is waiting for me the close the '. If I try the ADC same statement in mysql command line: ADC update vusers set name=Adrian D'Costa where id=3; Query OK, 0 rows ADC affected (0.01 sec) ADC Rows matched: 1 Changed: 0 Warnings: 0 ADC It works. How do I do the same in php? ADC TIA ADC Adrian ADC - ADC Before posting, please check: ADChttp://www.mysql.com/manual.php (the manual) ADChttp://lists.mysql.com/ (the list archive) ADC To request this thread, e-mail [EMAIL PROTECTED] ADC To unsubscribe, e-mail [EMAIL PROTECTED] ADC Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Best regards, Olexandrmailto:[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
Re: Password encryption
Hello Leon, Friday, June 08, 2001, 9:28:05 PM, you wrote: LM Hello all, LM I have some questions about password encryption. I want to make some sort of encryption method that disables a human to read the password, but does allow my (php) script to convert the encoded LM password to a human-readable password, the member originally entered and the member enters in the form (if he or she has the password right) . LM In other words, I want a string to be encrypted and decrypted, if it's possible in the query. LM An example: LM insert into table values (encrypt(secret)); LM select decrypt(passfield) as pass from table; LM and here, pass will contain the value of secret. LM Thanks in advance, LM Leon Mergen LM [EMAIL PROTECTED] LM BlazeBox, Inc. LM ICQ: 55677353 But what for??? -- Best regards, Olexandrmailto:[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
Re: beginner question
Hello Marshall, Saturday, June 09, 2001, 9:05:18 AM, you wrote: MB I'm a new user, working through the tutorial provided in the MySQL documentation (chapter 9). I'm trying to load the data from the pet.txt file into the pet table using the specified command: MB mysql load data local infile pet.txt into table pet; MB I get the following: MB ERROR: MB File 'pet.txt' not found (Errcode: 2) MB I assumed that the text file was in the wrong directory, and reviewed the section describing the load data local command. Just to be safe, I put copies of the text file in several locations, MB including the menagerie directory (which should be the only one required), the bin directory, and the mysql directory. I still get the error message. MB What might I be doing wrong? MB Also, is there a FAQ that might hold the answer to newbie questions like this? MB Thanks for the help. Did you try load data local infile ...fullpath/pet.txt into table pet;? -- Best regards, Olexandrmailto:[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
-bin.001 --- files?
Hi Folks, I am running a webserver with around 100.000 hits per day running mostly on PHP / MySQL. In the mysql-data-directory (for my home /var/lib/mysql) I find a some files named: ./server-bin.009 ./server-bin.010 ./server-bin.011 ./server-bin.012 ./server-bin.013 ./server-bin.014 and so on (001 - 014). Some of them are really HUGE (300 MB i.e.) ... which is bigger than my whole database. Could someone tell me what this files are for? Thanks in advance and sorry for my bad english Thomas -- Thomas Seifert mailto:[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
StarOffice
Hi I am new to this list, so foregive me if this have been asked before. Can anybody inform me and maybe point me in a direction (faq, etc.) for connecting mysql and StarOffice (Sparc, Solaris). Thanks and best regards Jan Birk - 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: Speed of query - And Indexes
I've used a rule of thumb that I was told ages ago when working on other databases that inserting records into a non-indexed table is faster generally than inserting records into an identical but indexed table. Makes sense to me, since it has to update the indexes in the latter case. However the speed gained from not updating indexes is probably lost in the extra time it would take to query a table that doesn't have the proper indexes, assuming you query the table somewhat often. It also shows why too many or unnecessary indexes can slow down inserts to a database. - 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: -bin.001 --- files?
They are mysql binary logs of updates to your databases, and are usually only needed for replication across multiple servers. If you don't need this, remove or comment out the log-bin line from /etc/my.cnf and restart mysqld, then you can delete them. Hi Folks, I am running a webserver with around 100.000 hits per day running mostly on PHP / MySQL. In the mysql-data-directory (for my home /var/lib/mysql) I find a some files named: ./server-bin.009 ./server-bin.010 ./server-bin.011 ./server-bin.012 ./server-bin.013 ./server-bin.014 and so on (001 - 014). Some of them are really HUGE (300 MB i.e.) ... which is bigger than my whole database. Could someone tell me what this files are for? Thanks in advance and sorry for my bad english Thomas - 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: running multiple mysqld's
Running two copies of mysqld in one single machine *HAS* its purpose. What if, for whatever reason, mysqld died? I personally havent seen mysqld died on me, but on a rare occasion, the database got corrupted and it made mysql useless. but if I made my application to be a bit more intelligent and either communicate with two mysqld or use a backup database file you know what i mean. jaime At 03:02 AM 6/9/01 -0230, Neil Zanella wrote: Sorry about this questions but why would you want to run two copies of mysqld when it is capable of hosting as many different databases as you need? Even if you needed two databases with the same name you could still just create two different MySQL users for it. Thanks, Neil On Sat, 9 Jun 2001, Rohit Peyyeti wrote: Hello All: I have two mysqld runnning in ports: 3307 3308 respectively. I started the second one by using 'mysqld_multi start 2'. whereas mysqld running on port 3307 is the default mysqld started at the boot time. when i issue command such as: mysql -u root -p (it connects to my new mysqld running on 3307). Why is that it won't connect to mysqld running on port 3308. I also tried giving in port / socket options to mysql but to no luck! I cannot connect to mysqld running on port 3307 (default mysqld which is started at boot time) Can any one help here? ...Rohit - 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: -bin.001 --- files?
Wow 300 MB logs ;-). Thanks a lot! Thomas At 11:35 09.06.2001, you wrote: They are mysql binary logs of updates to your databases, and are usually only needed for replication across multiple servers. If you don't need this, remove or comment out the log-bin line from /etc/my.cnf and restart mysqld, then you can delete them. Hi Folks, I am running a webserver with around 100.000 hits per day running mostly on PHP / MySQL. In the mysql-data-directory (for my home /var/lib/mysql) I find a some files named: ./server-bin.009 ./server-bin.010 ./server-bin.011 ./server-bin.012 ./server-bin.013 ./server-bin.014 and so on (001 - 014). Some of them are really HUGE (300 MB i.e.) ... which is bigger than my whole database. Could someone tell me what this files are for? Thanks in advance and sorry for my bad english Thomas - 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 -- Thomas Seifert mailto:[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
Re: Why can't I set user variables from a SHOW statement?
Basil Hussain writes: Hi all, Is there any reason why I can't do something like any of the following? SET @blah := SHOW VARIABLES LIKE 'server_id'; SHOW @blah := VARIABLES LIKE 'server_id'; It doesn't seem to work no matter which combinations of syntax I try. Is setting user variables only supported via the SET and SELECT statements? I think it's a shame that setting variables from SHOW results is missing. I think that this functionality should be added to MySQL as it could be handy in some places. (For those who are wondering, I'm attempting to come up with a neat solution to avoid using auto-increment columns with co-replication between two MySQL servers. My idea was to have the server itself come up with a unique ID consisting of something like the current timestamp plus a random number plus the server's ID, rolled up into a concise hash value. My PHP script would perform a query like above when it first connects and then uses the saved user-variable in all subsequent queries where a unique ID is required.) Regards, Basil Hussain --- Internet Developer, Kodak Weddings E-Mail: [EMAIL PROTECTED] Hi! You can set variables to expressions only. Setting them to queries will be possible when stored procedures are implemented in about one year time. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
The table is full: bug in 3.22.32?
Hello, I tried to make a query to MySQL, the version is: mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686). The result should be about 4843 rows, but I got this message instead of the result: ERROR 1114: The table 'SQL22e0b00_0' is full When I tried on version: mysql Ver 11.12 Distrib 3.23.32, for redhat-linux-gnu (i386). The result is: 4843 rows in set (4.13 sec) What is the problem? Is there anything wrong with 3.22? Should I upgrade to 3.23 to fix this problem? Please help and thanks very much. --bk - 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: Can not install
From: root [EMAIL PROTECTED] Lookks like your mailer is misconfigured... At 11:38 PM -0400 6/8/01, root wrote: Description: I was installing MySQL on my Red Hat 7.1 server; I tried both the RPM and the tar.gz format. No matter what, though, I don't have mysqladmin or safe_mysqld files anywhere. I imagine that there are several other things missing as well. Note that when I try to run make with the tar source it gives me the following error message: make: *** No targets specified and no makefile found. Stop. I have no errors whatsoever with the RPM format. It just doesn't work. The daemon appears to be running, but I can't set passwords or anything like that. Any idea how I can fix this? How-To-Repeat: For the RPM, MySQL-3.23.38-1.i386.rpm: rpm -i MySQL-3.23.38-1.i386.rpm You have installed only the RPM that contains the server. A different RPM contains the clients. http://www.mysql.com/doc/L/i/Linux-RPM.html For the tar: tar zxvf mysql-3.23.32.tar.gz groupadd mysql useradd -g mysql mysql ./configure --prefix=/usr/local/mysql make Don't know what happened here. From the description at the beginning of your message I was thinking you must have skipped the configure step. But if you ran it, you should have a valid Makefile. Fix: Submitter-Id: [EMAIL PROTECTED] Originator: root Organization: MySQL support: [none | licence | email support | extended email support ] Synopsis: Can not install Severity: critical Priority: high Category: mysql Class:support Release: mysql-3.23.38 (Official MySQL RPM) Environment: Intel Pentium III 450MHz, 256MB RAM, Red Hat Linux 7.1, fully up2date System: Linux darkchapter 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-81) Compilation info: CC='egcs' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='egcs' CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 May 6 17:51 /lib/libc.so.6 - libc-2.2.2.so -rwxr-xr-x1 root root 1236396 Apr 6 17:58 /lib/libc-2.2.2.so -rw-r--r--1 root root 26350254 Apr 6 15:27 /usr/lib/libc.a -rw-r--r--1 root root 178 Apr 6 15:27 /usr/lib/libc.so Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --without-berkeley-db --without-innodb --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man '--with-comment=Official MySQL RPM' -- Paul DuBois, [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
Re: StarOffice
Jan: Go to http://lists.mysql.com/ open the General Discussion archive, and search for 'StarOffice'. G. Jensen - Original Message - From: Jan Birk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 4:17 AM Subject: StarOffice Hi I am new to this list, so foregive me if this have been asked before. Can anybody inform me and maybe point me in a direction (faq, etc.) for connecting mysql and StarOffice (Sparc, Solaris). Thanks and best regards Jan Birk - 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
We supply targeted PROSPECTING databases.
We supply targeted databases on CD, price £150 each. Do you sell to any of these markets? Computing 22,159UK companies Construction238,685 UK companies Education 39,416UK organisations Engineering 289,448 UK companies Garage Services 71,933UK companies Medical 56,037 UK organisations Hospitality 80,210 UK organisations Insurance Finance 27,983 UK companies Professionals 186,126 UK organisations Retail outlets 138,422 UK companies Sport Leisure 38,972 UK organisations Transport 67,262 UK companies Manufacturers 54,355 UK companies Free samples and category lists. If you need custom data, just tell us what you are looking for. Best regards, Robert Seviour UK Technology Database Ltd 1 East Bay, North Queensferry, Fife, KY11 1JX Tel: +44 (0)1383 411 900 Fax: +44 (0)1383 411 656 [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
Re: like
Hello Antonio. On Fri, Jun 08, 2001 at 11:50:25PM -0700, [EMAIL PROTECTED] wrote: [...] select * from [table] where ([string] like %[keyword]$) SELECT * FROM table1 WHERE (helloworld like CONCAT(%,keyword,%) should work, IMHO. Another possibility is to use string functions like this: SELECT * FROM table1 WHERE LOCATE(keyword, helloworld) 0 Bye, Benjamin. - 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: Mysqld crashes immediately
Hi, we had exactly the same problem here. We solved it by applying some patches in the operating system. Unfortunately.I don't have in this momente the relation of patches applied but I can't get them on next monday. Let me know if you were interested and we can send them. {}S Jose Vilmar Estacio de Souza MailTO: [EMAIL PROTECTED] + 55 21 7894-3041 INFORMAL INFORMATICA http://www.informal.com.br + 55 21 556-7903 - Original Message - From: Larbes, James (GEAE, CDI Corp) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 12:57 PM Subject: Mysqld crashes immediately I have installed mysql-3.23.38-hp-hpux10.20-hppa1.1 on an hpux10.20 Unix machine. However, I cannot get the mysqld executable to run. I get an error that looks like this: # ./bin/safe_mysqld --skip-grant --user=mysql Starting mysqld daemon with databases from /usr/local/mysql/data ./bin/safe_mysqld[238]: 14423 Memory fault 010608 11:55:52 mysqld ended None of the other executables in the bin/ directory will run because I either get a mysql.sock error or an error telling me to start the mysqld daemon. Please reply to [EMAIL PROTECTED] if you can help Thanks. - 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 encryption
Anyone has any idea how much this encryption method sucks up server load? _ Leon Mergen [EMAIL PROTECTED] President of Operations BlazeBox, Inc. ICQ: 55677353 - Original Message - From: Joshua J. Kugler [EMAIL PROTECTED] To: Leon Mergen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 08, 2001 9:47 PM Subject: Re: Password encryption Look in the manual about the ENCODE/DECODE functions. j- k- On Friday 08 June 2001 10:28, you wrote: Hello all, I have some questions about password encryption. I want to make some sort of encryption method that disables a human to read the password, but does allow my (php) script to convert the encoded password to a human-readable password, the member originally entered and the member enters in the form (if he or she has the password right) . In other words, I want a string to be encrypted and decrypted, if it's possible in the query. An example: insert into table values (encrypt(secret)); select decrypt(passfield) as pass from table; and here, pass will contain the value of secret. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - 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
BDB
Hi! Are there any production systems out there using BDB (transactions) ? (I guess so.) I would like to have some examples of MySQL transaction support being used in production environments. (I need some proof of BDB being stable enough to use it for mission critical data.) Do you know of such systems, I could use for a demonstration ? (preferably web based) Thanks in advance. .SiCk of IT. - 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: running multiple mysqld's
Neil Zanella wrote: Sorry about this questions but why would you want to run two copies of mysqld when it is capable of hosting as many different databases as you need? Even if you needed two databases with the same name you could still just create two different MySQL users for it. Thanks, Hi, I see several reasons for that: - mysqld is a multithreaded single process. That meens it cannot use more than 4Gb of RAM on 32 bits OS (and if fact much less, 2G to 3.5Gb depending on OS configuration). Since you can have highend Intel servers with more than 4Gb of RAM, you will make much better use of your RAM with multiple mysqld instances. - If you want to have a very high number of simultaneous connections, you must have several mysqld running. For instance, mysqld on Linux is limited to ~1500 simultaneous connections; if you want more, you have to use several mysqld. (Of course, you can do that only if all your clients don't use the same database). - Minimising MySQL downtime: Each time one mysqld process crashes, you just have to repair the databases it was managing. For instance, if you have 4 databases served by 4 mysqld, you just repair one database instead of 4 before restarting. (Please no flames here, I know that MySQL is considered as very stable; however, it sometimes crashes: there were several reports of mysqld killed by signal 11 on this list) Of course, most MySQL users don't need to run more than one mysqld, but you asked, so here are some reasons. Regards -- Joseph Bueno NetClub/Trader.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
RE: Compiling an PHP 4.0 module with MySQL
Gabriele, Thank you for your interest. I am using /usr/bin/ because this is where my mysql file is, and my libmysqlclient.* files are in /usr/lib/. I tried using just /usr (i.e. --with-mysql=/usr) as you suggest, but get the same results. In fact the file mysql.h is not anywhere in my filesystem. The MySQL installation was managed by the Mandrake distribution I am wondering if the header files have been omitted. Any other thoughts would be appreciated, but please note that I can get my scripts to run by changing reference to the host in the mysql connections functions to 127.0.0.1 from localhost. It works but I don't know why? Keith At 09:09 08/06/01 +0200, Gabriele Bartolini wrote: ./configure --with-mysql=/usr/bin --with-apxs --enable-track-vars Ciao, sorry but I just joined this mailing list, so I am not aware of any previous messages. /usr/bin ? Why in that directory? Can I please get to know how did you install MySQL? By RPM? Please try these 2 find commands? find / -name mysql.h(in my system it's under /usr/include/mysql/) find / -name libmysqlclient.*(in my system it's under /usr/lib/mysql/lib/) The latest RPM version comes with this prefix: /usr (so just put --with-mysql=/usr ) Let me know! Hope this helps! -Gabriele - Gabriele Bartolini - Computer Programmer U.O. Rete Civica - Comune di Prato Prato - Italia - Europa e-mail: [EMAIL PROTECTED] http://www.po-net.prato.it - A Supernova is the celestial equivalent of rm -rf /* with root permissions. - - 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: bug report
At 00:13 10/06/2001 +0900, atsushi wrote: Hi, The problem reported happens on Win9x and ME platform because mysqld.exe was compiled accidentally with a __NT__ define for the InnoDB library. Use instead the mysqld-max.exe server on these OSs. This issue is already fixed for the next release. Regards, Miguel hello, I've encountered the following message after I've set inodb_file_path. C:\WINDOWSmysqld Innobase: Assertion failure in thread 4293055721 in file M:\mysql-3.23\innobase\ os\os0file.c line 187 Innobase: we intentionally generate a memory trap. Innobase: Send a bug report to [EMAIL PROTECTED] 010602 7:39:48 D:\HTTPD\MYSQL\BIN\MYSQLD.EXE: Got signal 11. Aborting! 010602 7:39:49 Aborting InnoDB: Warning: shutting down not properly started database 010602 7:39:55 D:\HTTPD\MYSQL\BIN\MYSQLD.EXE: Shutdown Complete My computer's spec is pentiumII 366khz with 128kb memory, windows98 servicepack1, apache1.3.20, mysql3.23. I'm now using mysql without innobase so I always see the message, 'inodb_file_path is not set'. Is this ok to use mysqld? Or am I supposed to use mysql after inodb_file_path is set? I don't know what to do. also I don't know what country this message will go. Atsushi Nakasugi in Japan. - 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 -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Miguel A. Solórzano [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Mogi das Cruzes - São Paulo, Brazil ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
(sleeping) processes of 90% CPU
Hello, I'm a database administrator for a hosting provider, and we have currently 2 SMP MySQL-database servers. The one that is causing me problems, has at least 900 databases running on it. That's an dual PIII-550, with 1024MB memory, running RedHat 6.2, with Linux 2.4.5-ac4. During working hours, a load of 5 6 is pretty default, with about 600 mysqld processes. This is already reduced from 900 to 600, by setting the wait-timeout to 600 seconds, to 120, to 30 at the moment. The problem is that the server is in an unstable situation lately. I see a lot of MySQL-processes with top (sorted by MEM-usage), that are taking over 90% CPU. If I strace -p PID the process, it returns me nothing. I assume this is a sleeping process. RSS sometimes is 120M, most of the time between 20 and 40M. No change in running 3.22.32, 3.23.31 - 3.23.38 (.38 currently). Anyone has a hint on what happens ? SHOW PROCESSLIST gives me for 90% Sleeping as output. Here is (partially) my /etc/my.cnf : skip-locking set-variable= key_buffer=384M set-variable= max_allowed_packet=1M set-variable= table_cache=512 set-variable= sort_buffer=2M set-variable= record_buffer=2M set-variable= thread_cache=8 set-variable= thread_concurrency=4 set-variable= myisam_sort_buffer_size=64M set-variable= max_connections=1250 set-variable= max_connect_errors=9 set-variable= wait_timeout=30 -- Met vriendelijke groet/With kind regards, Cable Wirelesshttp://www.widexs.nl Wouter de Jong System-Administrator Tel +31 23 5698070 Fax +31 23 5698099 Bijlmermeerstraat 62, 2131 HG HOOFDDORP, NL - 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: encrypt wierdness
For passwords it is good to use the sql function password(). This is done like this: to insert: insert into users ('username1234', password('userspassword') ); to load select * from users where username='username1234' AND password=password('userspassword') Hope this helps. ryan Hi, So where does mysql get its salt from? Is it a random salt? This confused the hell our of me for around an hour! You should look MySQL manual not C crypt manpage ;). And yes, this is random salt and makes life little bit more secure. Ok, so you can obtain a random result (thought that was what random() was for), but still cannot understand how this could be usefull. If you take another look at the man page for the crypt() system call, you'll notice that it says that the first two characters represent the salt itself when mentioning what constitutes the returned value. So, given this, you can consistently re-encrypt a string to compare against the original by taking the first two characters and using them as the salt. The example below demonstrates this. mysql select encrypt('blahblah'); +-+ | encrypt('blahblah') | +-+ | IIRggo.uD7.Xk | +-+ 1 row in set (0.00 sec) mysql select encrypt('blahblah', 'II'); +---+ | encrypt('blahblah', 'II') | +---+ | IIRggo.uD7.Xk | +---+ 1 row in set (0.00 sec) I use encrypt to store password info in a database, but how do you compare the user entered password with the one in the database if the results vary the whole time? Please give me an application for this behaviour and I will be happy :-) In your case, when comparing the password the user has entered against what is in the database (an encrypted value) you first need to get the first two characters of what is already in the database for that user. Something along the lines of this should do the trick: SELECT * FROM users_table WHERE username = 'johndoe' AND passwd = ENCRYPT('secretpasswd', LEFT(passwd, 2)); Regards, Basil Hussain --- Internet Developer, Kodak Weddings E-Mail: [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
Problem with instalation.
Hello mysql, I have FreeBSD 4.3, gcc 2.95.3 I do: ./configure gmake install I have error when I try to compile mysql: gmake[1]: *** No rule to make target `my_init.c', needed by `my_init.lo'. Stop. gmake[1]: Leaving directory `/c/mysql-3.23.38/libmysql' gmake: *** [install-recursive] Error 1 Please help me! Best regards, All [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
Re: beginner question
At 1:05 AM -0500 6/9/01, Marshall Bohlin wrote: I'm a new user, working through the tutorial provided in the MySQL documentation (chapter 9). I'm trying to load the data from the pet.txt file into the pet table using the specified command: mysql load data local infile pet.txt into table pet; I get the following: ERROR: File 'pet.txt' not found (Errcode: 2) I assumed that the text file was in the wrong directory, and reviewed the section describing the load data local command. Just to be safe, I put copies of the text file in several locations, including the menagerie directory (which should be the only one required), the bin directory, and the mysql directory. I still get the error message. The file should be in the same directory where you're running mysql. Otherwise, you'll need to specify the pathname to the file. For example, if it's in the /tmp directory, your statement would be: mysql load data local infile /tmp/pet.txt into table pet; What might I be doing wrong? Also, is there a FAQ that might hold the answer to newbie questions like this? Thanks for the help. -- Paul DuBois, [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
Internals Of MySQL
Hi All, Im running some benchmarking tests on mysql, postgres and interbase database servers. does anyone know the reasons why or know where i can find out some technical reasons why the mysql database server is particularly good in relation to the others or just by itself e.g. use of query optimisation or indexing etc. I'm only looking at creates, selects, inserts, update and delete statements. I've tried to look around for this on the net, but all i seem to get is a big arguement consisting of the features lacking in mysql that are in other databases e.g. ACID!! Thanks, Dipesh - 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: which jdbc to use?
There are really only two. mm.mysql (varisous version) and the twz one. I suggest the mm.mysql one. They are both type 4 I believe there is no reason to choose the twz one over the mm one. I would use the latest 2.0 version unless you have code that would have a problem with it then you can use 1.2c. e.res wrote: hey all! i have a linux box with sdk2 java, apache,tomcat and mysql. i am planning to do some servlets/database development and was wondering what jdbc driver to utilize for that. mysql.com has several of them available for download. i also have j2ee distribution which i am planning to install (doesn't it come with jdbc? if that's the case this should be sufficient to get basic database tasks done between java and mysql? am ia on the right track here? ) can someone shed some light on this? thanks a lot! james __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.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: Internals Of MySQL
I'll have to pipe up and say that, empirically, mysql far outperforms postgres on a non-state-of-the-art server. I have seen 10 simultaneous connections to mysql and a system load of 0.1 versus 1 instance of postgres (postmaster) and a load of over 2 (and with 3 instances of postmaster a load of 8!) I know that hardware is cheap and obviously if I was running exclusively postgres I'd throw more ram and a faster CPU at it. Regards, Gary SuperID Huntress === FreeSQL.org offering free database hosting to developers Visit http://www.freesql.org - Original Message - From: Leon Mergen [EMAIL PROTECTED] To: Dip [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 3:24 PM Subject: Re: Internals Of MySQL I recently read an article at Zend.com, showing that Postgres had better performance than MySQL... Offcourse, this is a very bad thing to say in the MySQL mailing list, and I'm not really sure about it either, since so many praise MySQL... http://zend.com/zend/art/databases.php _ Leon Mergen [EMAIL PROTECTED] President of Operations BlazeBox, Inc. T: +31 31 735 03 03 F: +31 31 735 03 08 ICQ: 55677353 The information transmitted in this email is intended only for the person(s)or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and permanently delete the email from any computer. - Original Message - From: Dip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 8:55 PM Subject: Internals Of MySQL Hi All, Im running some benchmarking tests on mysql, postgres and interbase database servers. does anyone know the reasons why or know where i can find out some technical reasons why the mysql database server is particularly good in relation to the others or just by itself e.g. use of query optimisation or indexing etc. I'm only looking at creates, selects, inserts, update and delete statements. I've tried to look around for this on the net, but all i seem to get is a big arguement consisting of the features lacking in mysql that are in other databases e.g. ACID!! Thanks, Dipesh - 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
How many Mysql PIDs ?
Re: How many Mysql PIDs ? Date: Thu, 7 Jun 2001 15:42:15 -0700 From: Jeremy Zawodny [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: R Talbot [EMAIL PROTECTED] CC: [EMAIL PROTECTED] On Thu, Jun 07, 2001 at 08:23:03AM -0400, R Talbot wrote: Please explain why I get multiple Daemon process when I start mysql.server..Such as 1075 pts/0S 0:00 sh /usr/local/mysql/bin/safe_mysqld --user=root --pid 1093 pts/0SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 1095 pts/0SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 1096 pts/0SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ This occurs when starting as suggested through Link /etc/rc5.d/S99mysql or if I start from command line mysql.server start. If I kill one process all processes die.. Caldera 2.3 edesktop mysql 3.22.32 compiled from source. Because that's how the Linux kernel implements threads. They're all part of the same process, actually. It just looks a bit funny. If you kill the right one, they'll all die. There is more on this topic in the mail archives, of course. It's a fairly common question. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951 MySQL 3.23.29: up 13 days, processed 82,085,883 queries (71/sec. avg) Jeremy, Yeah I follow you and as a LInux user of 5 years I am accustomed to seeing multiple processes launched for the same executable but I installed the same version of Mysql on a 2nd machine on my LAN. The difference being the 2nd installation was on Caldera 2.4 edesktop and was the rpm install.. My process question was vs. regarding the compiled from source same version on Caldera 2.3..Same version of Mysql should Launch the same processes, No? The rpm package shows these associated processes only when I command #prompt ps x 679S 0:00 sh /usr/bin/safe_mysql --user=mysql --pid-file=/var/ 774S 0:01 httpd -f /etc/httpd/conf/httpd.conf -D AUTH_MYSQL -D The src package shows these associated processes only when I command #prompt ps x 754 ?S 0:00 httpd -f /etc/httpd/apache/conf/httpd.conf 790 ?S 0:00 sh /usr/local/mysql/bin/safe_mysqld --user=root --pid 858 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 875 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 876 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ Notice the difference in the apache server conf between versions... The compiled source did not produce a mod auth_mysql.conf Which is named in a IfDefine AUTH)_MYSQL in a Apache.conf It appears to use a mod_dav.conf a mod_perl.conf, a mod_php.conf and a mod_roaming.conf ONLY on Caldera 2.4 rpm install of MYSQL or perhaps, is this some module coding stuck in there by CALDERA with 2.4 ver.? Please Shine a light over here .. :^) .. Bob T - 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: Too many PIDs
Jeremy.. Apoligies I shot off an email to you 3 seconds before I saw this one. Please read both..this email and that email.. Jeremy Zawodny wrote: On Thu, Jun 07, 2001 at 07:36:54PM -0400, R Talbot wrote: Jeremy So what your pointing out is I am seeing several threads generated by mysqld... Yes. But that does not answer as to why the rpm installation start with one thread?? Both installations which I compiled from source start with multiple threads.. ( diffrent machines Caldera 2.3) Hmm. Same version of mysql both rpm and source..?? What are your thoughts as to why is one broken and not the other. I think they should all start with the same # of threads. Are they using the same config file? Yes, for Mysql but as you will read in my email of today the Apache.conf is altered.. Does SHOW PROCESSLIST on both show no active processes? mysql show processlist; ++--+---+--+-+--+---+--+ | Id | User | Host | db | Command | Time | State | Info | ++--+---+--+-+--+---+--+ | 2 | root | localhost | NULL | Query | 0| NULL | show processlist | ++--+---+--+-+--+---+--+ 1 row in set (0.01 sec) Same on both Machines Read my second Email Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951 MySQL 3.23.29: up 13 days, processed 84,025,473 queries (71/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
RE: How many Mysql PIDs ?
Hi Bob, thas just a difference in the apache-config from caldera. That has nothing to do with mysql! Thomas - Original Message - Jeremy, Yeah I follow you and as a LInux user of 5 years I am accustomed to seeing multiple processes launched for the same executable but I installed the same version of Mysql on a 2nd machine on my LAN. The difference being the 2nd installation was on Caldera 2.4 edesktop and was the rpm install.. My process question was vs. regarding the compiled from source same version on Caldera 2.3..Same version of Mysql should Launch the same processes, No? The rpm package shows these associated processes only when I command #prompt ps x 679S 0:00 sh /usr/bin/safe_mysql --user=mysql --pid-file=/var/ 774S 0:01 httpd -f /etc/httpd/conf/httpd.conf -D AUTH_MYSQL -D The src package shows these associated processes only when I command #prompt ps x 754 ?S 0:00 httpd -f /etc/httpd/apache/conf/httpd.conf 790 ?S 0:00 sh /usr/local/mysql/bin/safe_mysqld --user=root --pid 858 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 875 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ 876 ?SN 0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/ Notice the difference in the apache server conf between versions... The compiled source did not produce a mod auth_mysql.conf Which is named in a IfDefine AUTH)_MYSQL in a Apache.conf It appears to use a mod_dav.conf a mod_perl.conf, a mod_php.conf and a mod_roaming.conf ONLY on Caldera 2.4 rpm install of MYSQL or perhaps, is this some module coding stuck in there by CALDERA with 2.4 ver.? Please Shine a light over here .. :^) .. Bob T - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL authentication module for Apache
Where can I get MySQL authentication module for Apache? Thanks. -- Bolek, URL: http://www.bolek.com URL: http://slash.bolek.com e-mail: [EMAIL PROTECTED] ICQ: 4086197, Address: 402905326 - 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 authentication module for Apache
So sprach --==[bMan]==-- am Sat, Jun 09, 2001 at 06:35:31PM -0400: Where can I get MySQL authentication module for Apache? try google.com - the first hit for the exact quesion you asked will tell you Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 18 hours 36 minutes - 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 authentication module for Apache
On Sat, 9 Jun 2001, --==[bMan]==-- wrote: Where can I get MySQL authentication module for Apache? www.mysql.com, Downloads, Contrib, Web Tools.. right where one would expect it to be. -- Sapere aude My mind not only wanders, it sometimes leaves completely. - 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
Kinda unrelated
Hi All, I know this is not completely a mysql question, but it is related. I am trying to do all my authentication based out of a mysql database. Works great for radius, and ftp. Problem is, I can't figure out how to get apache to read where a users homeridr is out of mysql. It still looks in the passwd file. I can't see how I could use mod_auth_mysql for this. Anyone have any thoughts, or know where else I should ask ? Jim G
Request for help
Hello, everyone. Some of you may be aware that MySQL source and binary distribution comes with a public test suite. Some documentation on it is available at http://www.mysql.com/doc/M/y/MySQL_test_suite.html. But it is terribly lacking, as evidenced by the fact that we have not had one user submit a bug report in the test suite friendly format. We, of course, like to think that the reason for the above is that we just do not have that many bugs (:-)), but I am afraid that another reason is that the people do not know how to use it. Another problem is that the people who know how it works are first extermely busy with a multitude of projects, and on top of that, are not very good at writing documentation. So it would be really nice if someone could take a look at whatever info is available in the manual, study the source, play with it a little bit, appreciate how well it works (:-)), and write a nice, easy to follow tutorial. The benefits will be mutual: For you: * if you find a bug, or even if you have a feature in mind that is not there, you can sumbit the bug in a form that would be very easy to include into the test suite, which would increase the speed of fixing bug * if some feature is critical to your system, and you submit a test for it, this will make sure that whatever we change, we will never break that feature on accident in any of our releases. In fact, no developer will ever push a change to the main repository that will break that feature. * you will be famous - your name will be in the manual :-) For other users: * After reading your tutorial, people will be able to do what you do * MySQL 4.0 will be better tested and will enter the stable phase much sooner For us: * Too many to list, in short, life will be a lot easier :-) -- MySQL Development Team For technical support contracts, go to https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - 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: JOIN to the same table multiple times
Ok, I've answered my own question but now have another. How do I reference the sitename for the 3 sites? sitename returns the last sitename for all 3 I tried S1.sitename etc. but it doesn't work. Sir, in what way does it fail to work? $query = SELECT * FROM department LEFT JOIN sites S1 ON deptsite1=S1.sitekey LEFT JOIN sites S2 ON deptsite2=S2.sitekey ORDER BY $order $dir; What's the $dir for? Does this statement fail in both PHP and the MySQL interface, or only in PHP? You can avoid dealing with aliases entirely if you normalize the department table. Bob Hall $result = mysql_db_query($dbName,$query); while ($r=mysql_fetch_array($result)) { echo tr bgcolor=$colorvalues tdfont size=\-1\$r[deptdesc]/td /tr tr bgcolor=$colorvalues tdfont size=\-1\$r[sitename]/td tdfont size=\-1\$r[deptphone1]/td tdfont size=\-1\$r[deptfax1]/td tdfont size=\-1\$r[deptemail1]/td tdfont size=\-1\$r[deptmobile1]/td/tr tdfont size=\-1\$r[sitename]/td tdfont size=\-1\$r[deptphone2]/td tdfont size=\-1\$r[deptfax2]/td tdfont size=\-1\$r[deptemail2]/td tdfont size=\-1\$r[deptmobile2]/td/tr tdfont size=\-1\$r[sitename]/td tdfont size=\-1\$r[deptphone3]/td tdfont size=\-1\$r[deptfax3]/td tdfont size=\-1\$r[deptemail3]/td tdfont size=\-1\$r[deptmobile3]/td; -Original Message- From: Ross Goonan [mailto:[EMAIL PROTECTED]] Sent: Friday, 8 June 2001 11:47 To: [EMAIL PROTECTED] Subject: JOIN to the same table multiple times ### Creating a Telephone / Information Directory with MySQL / PHP3 People belong to a department a site. Need to be able to: List all people List all people within a Department List all people within a site List all people within a Department Site Have set up Department table with site1, site2 site3 as the same department exists in multiple sites. When listing a site, I need to JOIN the site table multiple times to get the site name. SELECT * FROM Department LEFT JOIN Site ON Site1=Sitekey - Works no worries SELECT * FROM Department LEFT JOIN Site ON Site1=Sitekey LEFT JOIN Site ON Site2=Sitekey - Error 1066: Not unique table/alias 'Site' SELECT * FROM Department LEFT JOIN Site ON Site1=Sitekey LEFT JOIN Site AS Sitetable ON Site2=Sitekey - Error 1052: Column 'Sitekey' in on clause is ambiguos ### rpm -qa | grep SQL MySQL-3.23.33-1 MySQL-client-3.23.33-1 MySQL-devel-3.23.33-1 rpm -qa | grep sql php-mysql-3.0.16-2bc perl-Msql-Mysql-modules-1.2210-2 ### People Table Surname Firstname Department site Department Table Name Site1 site2 site3 Site Table Sitekey Sitename ### - 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 Know thyself? Absurd direction! Bubbles bear no introspection. -Khushhal Khan Khatak MySQL list magic words: sql query database - 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: Update phone inner join tmpphone....
I tried this query: Update phone inner join tmpphone on phone.empno = tmpphone.empno set phone.lname = tmpphone.lname, phone.fname = tmpphone.fname and it didn't work. This works in MSAccess. Is this syntax (or something like it) supported by MySQL?? No sir. Updating a table based on data in another table won't be supported until version 4 comes out. Bob Hall Know thyself? Absurd direction! Bubbles bear no introspection. -Khushhal Khan Khatak MySQL list magic words: sql query database - 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 question
I'm having a lot of difficulty trying to figure this out. I have a table with a list of projects that I would like to arrange and view as a tree. This is my table: ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | id | int(10) unsigned | | PRI | NULL| auto_increment | | name | varchar(64) | | MUL | || | handle | varchar(18) | | | || | parent | int(10) unsigned | | | 0 || | status | varchar(64) | | | || | data | text | YES | | NULL|| ++--+--+-+-++ This is what I want to get in the end: + root project | + project 1 | | | + sub project 1.1 | + sub project 1.2 || |+ sub project 1.2.1 | + project 2 | + sub project of 2.1 + sub project of 2.2 What SQL statement(s) would retrieve my records, ordered by project ID, but grouped recursively into a tree? Or, is this something not possible through SQL itself? Thanks, Davis -- Design Office 11912 Washington Blvd. Los Angeles, California t. 310 390 8098 f. 310 390 6029
Compilation problem
Hi all, My ISP provides me with MySql version 3.23.36 on Red Hat Linux 5.2 box, gcc version is 2.7.2.1 When I try to compile my C application I get lots of errors. What is wrong ? Since this is not my own server, what should I ask my ISP to do in order to correct this? gcc -o test.cgi test.c cgihtml.a -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient -lz /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `net_safe_read': libmysql.o(.text+0x2bc): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `simple_command': libmysql.o(.text+0x46b): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `read_rows': libmysql.o(.text+0xa64): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `mysql_real_connect': libmysql.o(.text+0xe85): undefined reference to `__stpcpy' libmysql.o(.text+0x146c): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o)(.text+0x148a): more undefined references to `__stpcpy' follow /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `mysql_list_dbs': libmysql.o(.text+0x25cd): undefined reference to `__mempcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `mysql_list_tables': libmysql.o(.text+0x2675): undefined reference to `__mempcpy' /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `mysql_stat': libmysql.o(.text+0x29aa): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function `vio_peer_addr': violite.o(.text+0x1d): undefined reference to `__mempcpy' /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function `vio_poll_read': violite.o(.text+0x306): undefined reference to `poll' /usr/local/mysql/lib/libmysqlclient.a(my_open.o): In function `my_open': my_open.o(.text+0x17): undefined reference to `open64' /usr/local/mysql/lib/libmysqlclient.a(my_error.o): In function `my_error': my_error.o(.text+0x1ba): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(mf_pack.o): In function `pack_dirname': mf_pack.o(.text+0x1e5): undefined reference to `__stpcpy' mf_pack.o(.text+0x240): undefined reference to `__stpcpy' mf_pack.o(.text+0x29f): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(mf_pack.o): In function `cleanup_dirname': mf_pack.o(.text+0x401): undefined reference to `__stpcpy' mf_pack.o(.text+0x6cc): undefined reference to `__mempcpy' mf_pack.o(.text+0x725): undefined reference to `__stpcpy' mf_pack.o(.text+0x7ee): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(mf_pack.o): In function `unpack_filename': mf_pack.o(.text+0xa15): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(mf_pack.o): In function `intern_filename': mf_pack.o(.text+0xa5e): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(typelib.o): In function `find_type': typelib.o(.text+0x13d): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(typelib.o)(.text+0x174): more undefined references to `__stpcpy' follow /usr/local/mysql/lib/libmysqlclient.a(mf_format.o): In function `fn_format': mf_format.o(.text+0x20f): undefined reference to `__lxstat64' /usr/local/mysql/lib/libmysqlclient.a(default.o): In function `search_default_file': default.o(.text+0x4d9): undefined reference to `__stpcpy' default.o(.text+0x53f): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(default.o): In function `print_defaults': default.o(.text+0x95b): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(my_net.o): In function `my_inet_ntoa': my_net.o(.text+0x16): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(my_lib.o): In function `my_dir': my_lib.o(.text+0x1f7): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(my_lib.o)(.text+0x210): more undefined references to `__stpcpy' follow /usr/local/mysql/lib/libmysqlclient.a(my_lib.o): In function `my_dir': my_lib.o(.text+0x269): undefined reference to `readdir64' /usr/local/mysql/lib/libmysqlclient.a(my_lib.o): In function `directory_file_name': my_lib.o(.text+0x343): undefined reference to `__stpcpy' /usr/local/mysql/lib/libmysqlclient.a(my_lib.o): In function `my_stat': my_lib.o(.text+0x3a8): undefined reference to `__xstat64' /usr/local/mysql/lib/libmysqlclient.a(my_lib.o): In function `my_fstat': my_lib.o(.text+0x406): undefined reference to `__fxstat64' /usr/local/mysql/lib/libmysqlclient.a(my_fopen.o): In function `my_fopen': my_fopen.o(.text+0x1f): undefined reference to `fopen64' make: *** [test] Error 1 Thanks in advance, Mitko - 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
RE: SQL question
I don't think it's possible purely with SQL using MySQL. I tried researching it just a few days ago, and found Oracle supports a clause CONNECT BY ... PRIOR (more info at http://www.arsdigita.com/books/sql/trees.html) which does this for you, but it's still in the MySQL todo list (http://www.mysql.com/doc/T/O/TODO_future.html). If you are using PHP, I can send you to some code which will accomplish the same thing. I'm having a lot of difficulty trying to figure this out. I have a table with a list of projects that I would like to arrange and view as a tree. This is my table: - 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 Problem -- Please help
I'm using MySQL with PHP (just learned MySQL so bear with me). Here's a two part program: Test.php: html body ?php require(common.php); CalculateScore(1); ? /body /html Common.php: ?php //Global variables $Sitename=Toplist; $Siteurl=; $Links_per_page=50; $Base_site_url=localhost; //MySQL stuff $host=localhost; $user=root; $password=pass32; $database=xtopsites; //Functions_begin //Score Calculation function CalculateScore($id) { mysql_connect($host, $user, $password); mysql_select_db($database); $querytest=insert into sitestats (id, arate, urate, inhits) values (1, 5, 5, 500); mysql_query($querytest); $sql = select urate, arate, inhits from sitestats where id = $id; $r = mysql_query($sql); $row = mysql_fetch_array($r); $arate = $row[arate]; $urate = $row[urate]; $inhits = $row[inhits]; if ($hits 3000) { $hits = 3000; } $score = (($arate * 5) + ($urate * 2) + ($inhits / 100)); echo($score); //$sql = update sitestats set score=$score where id = $id; //mysql_query($sql); } ? When I run test.php I get this: Warning: Supplied argument is not a valid MySQL result resource in common.php on line 27 0 Here are lines 25-27: 25: $sql = select urate, arate, inhits from sitestats where id = $id; 26: $r = mysql_query($sql); 27: $row = mysql_fetch_array($r); I thought using the result identifier returned by mysql_query in mysql_fetch_array was perfectly legal. Please help out :) Thanks alot.
Re: -bin.001 --- files?
On Sat, Jun 09, 2001 at 12:14:54PM +0200, Thomas Seifert wrote: Wow 300 MB logs ;-). I once accumulated 30GB of binary logs on a server before thinking hard about resetting things. :-) It made for a great way to throw real queries at a test server. I'd just make the test server a slave of the master and tell it to catch up... Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951 MySQL 3.23.29: up 15 days, processed 97,119,562 queries (72/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
RE: MySQL Problem -- Please help
I thought using the result identifier returned by mysql_query in mysql_fetch_array was perfectly legal. mysql_query() doesn't always return a valid result identifier if an error occurs (echo mysql_error()) or if no rows are returned. - 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 Problem -- Please help
When I run test.php I get this: Warning: Supplied argument is not a valid MySQL result resource in common.php on line 27 0 Here are lines 25-27: 25: $sql = select urate, arate, inhits from sitestats where id = $id; 26: $r = mysql_query($sql); 27: $row = mysql_fetch_array($r); I thought using the result identifier returned by mysql_query in mysql_fetch_array was perfectly legal. bonjour, Try: ...where id = '$id'; on line 25 jean-michel - 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: [LIH] RE: install apache, php + mysql on linux redhat 6.2
On Fri, 8 Jun 2001, Peter Kok wrote: Hi, Your mail is misleading I know it how to do it now First remove all rpm eg: php, apache and mysql You need not remove all rpms - just remove php then download tarball from php, apache and mysql download just php sources php4.0.5 new version apache-.1.3.19 mysql-3.22.32-pc-linux-gnu-i686.tar.gz (I found that it doesn't work on new version) tar zxvf all the above and install separaterly. work now just untar php ./configure with proper options make make install do necesary changes in httpd config files and you are ready to go!!! Why did yu have to uninstall apache and mysql? Tarique -- = B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net = - 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