linux-redhat 6.2
i get this error when starting MySQL ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) /var/lib/mysql/mysql.sock exists with srwxrwxrwx and user mysql. Brad. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: Question
Hi You should use the following construction: SELECT LAST_INSERT_ID (); This will return the last auto-increment value for the current connection. There is also an API function, and in PHP: mysql_insert_id or something like this. -Original Message- From: Jason Brunk [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 8:43 PM To: MySQL Subject: Question i have designed a system that works on MSSQL but i have decided to port it over to mysql. One of the problems i have come across is i need to figure out how to get the autoid back. so just say i insert a record, and MYSQL gives it the auto id of 6, how do i know that from my VB program? Jason - 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 segmentation fault on starting
SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `' and `'). SEND-PR: From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: mysqld segmentation fault on starting Description: mysqld segmentation fault on starting How-To-Repeat: # mysqld Segmentation Fault # ldd mysqld ldd: mysqld: execution failed due to signal 11 Fix: how to correct or work around the problem, if known (multiple lines) Submitter-Id: submitter ID Originator: Organization: The University of Hong Kong MySQL support: none Synopsis: mysqld segmentation fault Severity: critical Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.39 (Official MySQL binary) Environment: Solaris 8 (Intel), Pentium II 400MHz System: SunOS alumni2.hkucs.org 5.8 Generic_108529-07 i86pc i386 i86pc Architecture: i86pc Some paths: /usr/bin/perl /usr/local/bin/make /usr/local/bin/gcc GCC: Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.8/3.0/specs Configured with: ../configure --disable-nls --disable-libgcj --enable-languages=c++,f77,objc --with-gnu-as --with-gnu-ld Thread model: posix gcc version 3.0 Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1586076 Jan 24 23:07 /lib/libc.a lrwxrwxrwx 1 root root 11 Jun 16 16:22 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 938916 Jan 24 23:07 /lib/libc.so.1 -rw-r--r-- 1 root bin 1586076 Jan 24 23:07 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Jun 16 16:22 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 938916 Jan 24 23:07 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --disable-shared Perl: This is perl, version 5.005_03 built for i86pc-solaris - 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
Solaris Users: FIX (for src builds)
For those of you Solaris users who are compiling from source: If you get checking return type of sprintf... configure: error: can not run test program while cross compiling such as in posts: http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:75993 http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:76359 http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:76508 http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:69801 http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:72382 http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:40549 and many more... than I have a fix for you. The SFW version of gcc and gc++ that ships with Solaris 8 (and I believe also the versions that are available on sunfreeware.com) are slightly faulted. You need to have your LD_LIBRARY_PATH set. For the SFW packages make sure /opt/sfw/lib is in your LD_LIBRARY_PATH (and I'm not quite sure what it is for the sunfreeware.com versions, probably /usr/lib or /usr/local/lib). That should fix the problem both on Sparc and Intel (I've personally only tested this on intel, but I've been told the same situation exists on the sparc versions too). Thanks to friend and co-worker Phil Brown (www.bolthole.com) for his help. Developers: I hope this can be added to the documentation somewhere since it's such a popular question. sql (that's to get past the filter, ignore that). Phil Dibowitz -- Insanity Palace of Metallica http://www.ipom.com [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: SSH tunnel
Hi, I have come accross my problem with the port forwarding... Thanks to the help I got. I needed the flag -n (that tells ssh not to listen on stdin). So doing the following is working... assuming that you have privileges without passphrase between the server and the client... ssh -l username -L 222:mysqlServer:3306 mysqlServer -n -N -g (-N allows to run ssh in the background, -g allows ssh to accept connections from the server on the port 3306) In order to connect: mysql --host=127.0.0.1 --port=222 -user=username -p DBName I was also told that if you want to precise a port, you need to set up host as 127.0.0.1 Caroline _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: MySQL binary/source
MikemickaloBlezien [EMAIL PROTECTED] writes: I assume this is the correct one to download then: mysql-3.23.39-pc-linux-gnu-i686.tar.gz Mike(mickalo)Blezien Yes. -- 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
RE: Multiple users.
Why does it matter? They can't access them, so what harm is there? I am sure that it has been asked before. I am running a hosting company and I am running mysql on a win2k server. We don't want any customer to see other db's of any other customer, we just want them to see their own db's only. But even if you connect with a username who has access to only one db, when you type show databases you can see all other databases easily. Is there any solution to this problem? Omer Barlas [EMAIL PROTECTED] www.emedia.gen.tr - 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: direct ISAM access vs. SQL parser
Tim Bunce writes: Perhaps, but it's not listed here: http://www.mysql.com/doc/manual.php?search_query=handlerdepth=0 Tim. Apologies to you both, this has been done in 4.0 branch -- 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
Re: Perhaps a stupid question about KEY...
HI, Does it make any sense to create an index on the primary key? Ken - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Fournier Jocelyn [Presence-PC] [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 06, 2001 3:49 PM Subject: Re: Perhaps a stupid question about KEY... At 12:14 AM +0200 7/7/01, Fournier Jocelyn [Presence-PC] wrote: Hi, Is there any structural difference between a PRIMARY KEY and a UNIQUE key ? Thanks ;) Jocelyn Fournier Presence-PC www.presence-pc.com They're mostly the same, with these differences: There can only be one PRIMARY KEY per table, whereas you can have multiple UNIQUE keys. Any columns in a PRIMARY KEY must be declared NOT NULL; UNIQUE keys do not have this restriction. -- 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 - 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
F IRST TIME USER
Hi everybody I am still having problem.. please help I am able to connect to my remote mysql server but fail to create, user any database ... I let you know step by step.. what I have done 1. First I have connected to my remote server through Telnet. After becoming root... I had supplied following command... 2. mysql -h mydomainname -u root -p it prompts for password : it is blank so I just pressed enter. and Mysql prompt appeared.. mysql Then I typed 3. mysql use mysql; Result : - ERROR 1045 Access deneid for user [EMAIL PROTECTED] using password : no Can you please help me in this regards? Thanks Anoop Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm - 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: Adding fields
Hello, a purely calculated field ;(one that is calculated from present values in the row), doesn' t need to be stored at all, just calculate it when someone needs to see the calculated value. In other words.. you don't have to store it if you can calculate it from the present existing field values in your row. If it's an historic value, that's a different story,, you would have to store a running total... K bye,, Ken - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 2:45 PM Subject: Adding fields Hi All to many hours anyway I am struggling with what seems to be an easy task but I am stuck. I am trying to total the fields with numbers (run + swim + bike) from a racer name=joe and insert the ammount into a field called totals in a table called runner. UPDATE runner SET totals=SUM(run + swim + bike) WHERE name=joe Any hints M;-) - 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
F IRST TIME USER of MySQL
Hi everybody I am still having problem.. please help I am able to connect to my remote mysql server but fail to create, user any database ... I let you know step by step.. what I have done 1. First I have connected to my remote server through Telnet. After becoming root... I had supplied following command... 2. mysql -h mydomainname -u root -p it prompts for password : it is blank so I just pressed enter. and Mysql prompt appeared.. mysql Then I typed 3. mysql use mysql; Result : - ERROR 1045 Access deneid for user [EMAIL PROTECTED] using password : no Can you please help me in this regards? Thanks Anoop Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm - 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: help meeeeeeeee
On Wed, Jul 04, 2001 at 12:01:19AM -0500, ryc wrote: It sounds like you are asking for comments reguarding your choice of vb/mysql... If that is the case, sure it can be done. The only problem I can see if you plan on having end users use this program, they would have to install and configure Mysql on their computers. This might be a bit of a burdon for them. But that is for you to decide. Not strictly true, without more details; the M$ clients could be talking to a centralized MySQL server via ODBC. The list can offer more advice if you ask more specific questions. ryan -- Brian 'you Bastard' Reichert[EMAIL PROTECTED] 37 Crystal Ave. #303Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path - 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 segmentation fault on starting
Hung Hing Fai wrote: Description: mysqld segmentation fault on starting How-To-Repeat: # mysqld Segmentation Fault # ldd mysqld ldd: mysqld: execution failed due to signal 11 Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --disable-shared Perl: This is perl, version 5.005_03 built for i86pc-solaris Weird. Official MySQL binaries are all passed our pretty big and mature testsuite, so it should work.I am not trying to say that you are wrong :) but I would like to hear results if you download some other MySQL older version and try to execute it. Is there are any differences? Are you sure that your hardware is OK? I do not have access to Solaris-x86 now to test myself for this bug. If you can't find problem yourself then I am also located in Hong Kong and can try to solve this problem myself on your system. But I really want to avoid this if you are able to debug this stuff yourself. Tõnu - 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
I am running MySQL on a LINUX System. I am having trouble starting the server as a non root user. I set up a non user account and changed the permissions on the necessary files but I still can't start the server unless I do it as root. It just hangs there until I abort it. If I installed the server as root could this be a problem? Please help? - 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
my.cnf
I have a need to have two MySQL installations operable on the same Mac OS X server (which is much the same as a configuration for Linux or BSD). One is a complete binary installation to a custom location and the other a complete source installation to the standard installation location of /usr/local/bin. They have separate socket files and ports assigned to each (I realize this is not ideal but is what I need to do in my particular case). The MySQL manual mentions that the option file should be located at: DATADIR/my.cnf for Server-specific options. If I create two separate my.cnf files and locate them in the appropriate DATADIR for each of these, will there be any confusion over the options to be used? I am having problems doing so. BTW, according to the manual: DATADIR is the MySQL data directory (typically `/usr/local/mysql/data' for a binary installation or `/usr/local/var' for a source installation). Note that this is the directory that was specified at configuration time. Can I change this after installation and initial configuration? -- Michael __ ||| Michael Collins ||| ||| Kuwago Web Services ||| mailto:[EMAIL PROTECTED] ||| Seattle, WA, USA ||| http://www.lassodev.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: linux-redhat 6.2
Bradley Jenkins wrote: i get this error when starting MySQL ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) /var/lib/mysql/mysql.sock exists with srwxrwxrwx and user mysql. There is a possibility that this socket file belonged to RPM version of MySQL but you are using some other MySQL binary which creates socket file in different place. You can check where MySQL listens socket by command lsof -an | grep mysql for example. You should see location of socket. If not, then MySQL does not run at all. -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator /_/ /_/\_, /___/\___\_\___/ Hong Kong, China ___/ 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
ASP, Adding Records with Update: No Index value
I am having trouble reading the ID Field (auto incremented primary key) back after creating a new record in an update. The new record is created OK but the ID is not available to me. I have found related advice in the archives at http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:73847 and http://lists.mysql.com/cgi-ez/ezmlm-cgi?1:mss:23959 but this has not helped me. I understand that the table being updated needs to be indexed on the field being read back but this approach doesn't seem to be working for some reason. I have included some code below: The function Add returns nothing. Any ideas? cheers Murray -- The asp code looks like this: Function Add() Dim adoRec Set adoRec = Server.CreateObject(ADODB.Recordset) With adoRec .Open Test, Connection, adOpenDynamic, adLockOptimistic, adCmdTable .AddNew .Fields(Name) = Added .Update Add = .Fields(TestID) End With adoRec.Close Set adoRec = Nothing End Function And the table has the correct definition for TestID I believe: mysql describe test; ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | TestID | int(10) unsigned | | PRI | NULL| auto_increment | | Name | varchar(20) | | | || ++--+--+-+-++ Platform: - Win 2K - My ODBC - 3.23.38-nt - 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
Help - Selecting from many to many table.
Hello, I am new to SQL and just learning. I have a table of clients and a table of targets. I have a clients_targets table holding the keys for relating. I am having troble trying to select clients that are in more than one target. Eg. Select c.First_Name, ... From clients as c, clients_targets as ct, targets as t Where ct.Fk_Client_Id=c.Id and ct.Fk_Targets_Id=t.Id and ct.Fk_Targets_Id='1' and ct.Fk_Targets_Id='3' Group By c.Id Thanks in Advance, Simon - 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 restart.
Our Mysql server was shutdown with the mysqladmin -u XXX -p XXX shutdown and for some reason we can not restart it and can't make any connections to the Mysql server. This is on a FreeBSD server. what is the correct procedure to restart the Mysql server?? thanks, Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Fax: 1(225)686-2285 Tel: 1(225)686-2002 Toll Free: 1(800)594-4782 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - 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: Solaris Users: FIX (for src builds)
I'm using the procedures outline in my Mini-HOWTO at http://users.talstar.com/forager/MySQL-HOWTO.html and have been for several versions now without incident. The most important bit is the variable settings right before running ./configure. This is interesting info about gcc. I'll see how this affects everything else. The source for the HTML page lists where I got the information on the page. On 07-Jul-01, Phil Dibowitz said something totally profound about Solaris Users: FIX (for src builds) that made me ponder... PD For those of you Solaris users who are compiling from source: PD PD If you get checking return type of sprintf... configure: error: can PD not run test program while cross compiling such as in posts: [snip] PD PD and many more... than I have a fix for you. The SFW version of gcc and PD gc++ that ships with Solaris 8 (and I believe also the versions that are PD PD available on sunfreeware.com) are slightly faulted. You need to have PD your LD_LIBRARY_PATH set. For the SFW packages make sure /opt/sfw/lib is PD PD in your LD_LIBRARY_PATH (and I'm not quite sure what it is for the PD sunfreeware.com versions, probably /usr/lib or /usr/local/lib). PD PD That should fix the problem both on Sparc and Intel (I've personally PD only tested this on intel, but I've been told the same situation exists PD on the sparc versions too). Thanks to friend and co-worker Phil Brown PD (www.bolthole.com) for his help. [snip] -- Alan W. Rateliff, II: YourVillage.com Assistant Systems Administrator : 2700 Apalachee Pkwy [EMAIL PROTECTED] : Tallahassee, FL 32301 (850) 942-7021--- [EMAIL PROTECTED] http://support.yourvillage.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
characters supported in MySQL fields
I understand that any ASCII character can be stored within any of the non-numeric type fields. Does this mean just characters 1-255? What happens if I try to import a non-ASCII character, let say, into a VARCHAR field? Is it discarded or will I simply not be able to get into a MySQL field in the first place? In addition, do all of the following need to be escaped before being insert into a database? \0 An ASCII 0 (NUL) character \n A newline character \t A tab character \r A carriage return character \b A backspace character \' A single quote (`'') character \ A double quote (`') character \\ A backslash (`\') character \% A `%' character (this is used to search for literal instances of `%' in contexts where `%' would otherwise be interpreted as a wild-card character) \_ A `_' character (this is used to search for literal instances of `_' in contexts where `_' would otherwise be interpreted as a wild-card character) In other words, am I correct that none of these characters can be stored in a MySQL string field (such as CHAR, VARCHAR, or TEXT)? -- Michael __ ||| Michael Collins ||| ||| Kuwago Web Services ||| mailto:[EMAIL PROTECTED] ||| Seattle, WA, USA ||| http://www.lassodev.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
Localization with MySQL
I'm working on two projects for which I'm trying to build in functionality to localize or internationalize later. For one project, a large chunk of text would be translated into an unknown number of languages. For this I'm allowing the text to be a 'text' field in a record, with other fields holding the language code (i.e. 'en', 'fr') and another the charset for that language. For the second, only a set of keywords would be translated into a small number of languages. For this project I'm using one record per keyword, with the various language translations being separate fields within the record - the record 'id' is what drives searches in this case. I'm using an Apache server with Perl and PHP, and MySQL as a db (of course). The only steps I'm taking is to have a field specifying the language (in the first case) and to name the columns/fields by the language code (i.e. 'en', 'de, 'jp') in the second. I'm also allowing twice as many characters for the 'jp' field, since that language requires (as I understand it) 'double' characters to drive it. I intend to drive the content by (1) selecting the language according to the 'Accept-Language' variable in the user's browser OR (2) allowing the user to select a language manually. Obviously I'm not up to speed on the exact requirements of localization and using other languages, and am concerned more about some pedestrian basics first - I'm just trying to avoid painting myself into a corner. Is there anything else I should be doing, or doing different? Can you point me to any resources on localization that would help me build this right the first time? Thank you for any assistance, Nelson -- - 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]: characters supported in MySQL fields
At 10:56 PM +0200 7/7/01, Werner Stuerenburg wrote: Hm. I use php and that has a fuction addslashes which does the job - it adds slashes for all critical characters. So it transforms to \ - is that what you need? I am working with a CGI type application that has recently added MySQL to its list of available datasources. I cannot say which as I am under NDA. I think in this case the adding of a double quote is because of the way that the CGI is handling the input. I find that using the terminal I can indeed just add quotes to a field. I don't know how I can add the other types of characters and see if there are there since they are in effect invisible. So it is really that MySQL can handle ANY character? As long as it is ASCII 1-255? It is a matter of being able to get the data in there? (and having some way to display it when retrieving it?) I thought that the way the data was stored you could not use certain characters. If this is the case, then thanks for your help in clarifying the issue. -- Michael __ ||| Michael Collins ||| ||| Kuwago Web Services ||| mailto:[EMAIL PROTECTED] ||| Seattle, WA, USA ||| http://www.lassodev.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: db design questions
My comments are bellow: Pretty much was Siomara says is the way I think, except that I would have made the extra table for the two addresses. SIO: If you are sure that two addresses are enough for your business then I really don't see the reason to put in an extra table. Keeping it simple by putting them together with the simple attributes. It won't affect anything, and it will avoid extra selects to get this information. It will also avoid unnecessary joins. BUT... if in your business the user will be free to inform more than one home address or more than one comercial address and then mark the preferred one ...then go for the separated table. If you are not sure about what your business wants then go for the second option. It will provide more flexibility in a long run. For the kids field it depends on what you want. If you want to have information for each child then you would create a separate table, but if you just need to record the number of kids then I think one field in the main table would be fine. SIO: I definetly agree Also if you have information like you mentioned, gender and marital status, instead of making it a char or varchar field with the words Male and Female or Married and Single just use a tinyint and make the values 0 or 1. You should either comment somewhere what the 0 and 1 means or actually create another table for sex that just has two fields and two records. 0-male, and 1-female and same with marital status. SIO: I would handle gender in the application instead of creating a table for it. Another example of using a second table to store information would be the interest checkboxes you'll see on most web pages registration form. Its a list of check boxes that you are supposed to check what interests you have, movies, stocks, computers and so on. For this you would have your main table with no interest field, just the rest of your information plus your unique id. A second table (interest_definitions) would have two columns, interest_id and interest_text. and the third table (interests) would have user_id and interest_id. The interest_definitions would have all the possible interests someone can choose and the third table would have a row for each interest the user is into. SIO: I definetly agree specially if you consider that the number of interests in table may increase at anytime. Siomara Hope that wasn't too long winded. :) Roger - Original Message - From: Siomara Pantarotto [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 06, 2001 5:07 PM Subject: Re: db design questions Hi, Try to keep the simple attributes in one table and the repetitions in separated tables For example: A person has only one gender, one name, one marital stauts , etc however a person can have none,one or more than one kid. Create another table and create a relationship between both. I really don't know how many addresses you want to store for each person but if it's not that many. keep them in the same table. Create fields for streetwork, citywork, ststework, etc... and streethome, cityhome, etc... This allows you to store only one professional and one home adresses. If you want more than that ...then put them in a separated table as I suggested to do for kids I don't have an example similar to your need but you can take a look at my website at: www.geocities.com and maybe get some ideas from the example I posted there. click tutorials and team5.com ecommerce sample. good luck Siomara From: Ed Peddycoart [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Subject: db design questions Date: Fri, 6 Jul 2001 10:25:42 -0700 I am working on a website which will make use of a MySQL database. I know little if anything about the best way to design my db for efficiency, or anything else for that matter. The information which I need to put in the database will be contact/profile information on various people: Name, Address, Phone, Email, Marital Status, Spouse, kids, things like that and a field for comments submitted from the various people. Right now I have a single table with a record for each item I want to store. Is that an acceptable way? What are some websites which contain some basic information on DB design etc. Things such as the best way to structure the db for effiency, searches, what do all the terms mean (keys, index etc) etc. Ed - 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: Perhaps a stupid question about KEY...
On Sat, Jul 07, 2001 at 07:22:19AM -0700, Ken Sommers wrote: Does it make any sense to create an index on the primary key? Primary Keys are automatically indexed. In fact, you might say that a primary key is just a special type of index (it is). 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 21 days, processed 161,614,106 queries (86/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: my.cnf
On Sat, Jul 07, 2001 at 10:36:08AM -0700, Michael Collins wrote: The MySQL manual mentions that the option file should be located at: DATADIR/my.cnf for Server-specific options. If I create two separate my.cnf files and locate them in the appropriate DATADIR for each of these, will there be any confusion over the options to be used? I am having problems doing so. I've done it before. Another thing I've done is to put a /etc/my.cnf file in place that ALL the MySQL servers will read, and then override specific items in the individual datadir/my.cnf files. Believe or not, it works pretty well and makes the datadir files smaller. BTW, according to the manual: DATADIR is the MySQL data directory (typically `/usr/local/mysql/data' for a binary installation or `/usr/local/var' for a source installation). Note that this is the directory that was specified at configuration time. Can I change this after installation and initial configuration? I believe there's a command-line argument to mysql.server or save_mysqld (don't recall which) that lets you specify a datadir at runtime. Should be easy to figure out which, since they're both shell scripts. :-) 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 21 days, processed 161,621,502 queries (86/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 restart.
On 07-Jul-01 MikemickaloBlezien wrote: Our Mysql server was shutdown with the mysqladmin -u XXX -p XXX shutdown and for some reason we can not restart it and can't make any connections to the Mysql server. This is on a FreeBSD server. what is the correct procedure to restart the Mysql server?? localhost.root# uname -r 4.3-STABLE localhost.root# cd /usr/local/etc/rc.d localhost.root# sh mysql-server.sh start mysqld localhost.root# (and whats with the 15 blank lines after your .sig ?) 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. - 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-sorting auto_increment fields
Hi ANy idea how i can get my auto_increment fields to renumber themselves after deletion of records so that they all get re-ordered and run consecutively from 1 to whatever without any numbers missing ? Please help if you know how to do this Thanks Keith White
Re: re-sorting auto_increment fields
Kif wrote: Hi ANy idea how i can get my auto_increment fields to renumber themselves after deletion of records so that they all get re-ordered and run consecutively from 1 to whatever without any numbers missing ? Please help if you know how to do this I think we never will implement such stuff. auto_increment responsibility is to be unique and it should never appear back again when issued once. Idea is to identify record in database. If someone have right to reorder one table then relationships to other tables will be broken. auto_increment is totally technical field and if you do not like holes in it, programmer should use separate column for user-readable values additionally to auto_increment. -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator /_/ /_/\_, /___/\___\_\___/ Hong Kong, China ___/ 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
Re: characters supported in MySQL fields
Michael Collins wrote: I understand that any ASCII character can be stored within any of the non-numeric type fields. Does this mean just characters 1-255? No, MySQL supports also multibyte character sets used in Asian countries. This means much wider range than 256. What happens if I try to import a non-ASCII character, let say, into a VARCHAR field? Is it discarded or will I simply not be able to get into a MySQL field in the first place? Nothing bad happens. Just MySQL will decide later how to use it in ORDER BY clauses by character set stuff. Byte is byte. In addition, do all of the following need to be escaped before being insert into a database? \0 An ASCII 0 (NUL) character \n A newline character \t A tab character You should use mysql_real_escape_string() C API function. This will escape now and in future all needed stuff. If you still need explanation about escaping, read the manual on http://www.mysql.com. There is surely section describing what should be escaped. In other words, am I correct that none of these characters can be stored in a MySQL string field (such as CHAR, VARCHAR, or TEXT)? Yes. Problems appear when you sort those strings and they appear in wrong order. Take the manual and read about character sets and languages support. This surely helps you to avoid problems. -- -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator /_/ /_/\_, /___/\___\_\___/ Hong Kong, China ___/ 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
RE: characters supported in MySQL fields
On 07-Jul-01 Michael Collins wrote: I understand that any ASCII character can be stored within any of the non-numeric type fields. Does this mean just characters 1-255? What happens if I try to import a non-ASCII character, let say, into a VARCHAR field? Is it discarded or will I simply not be able to get into a MySQL field in the first place? CHAR TEXT will store multi-byte characters store just fine once you quote them. but select compare(s) will break if you don't use one of the BLOB types In addition, do all of the following need to be escaped before being insert into a database? \0 An ASCII 0 (NUL) character \n A newline character \t A tab character \r A carriage return character \b A backspace character \' A single quote (`'') character \ A double quote (`') character \\ A backslash (`\') character \% A `%' character (this is used to search for literal instances of `%' in contexts where `%' would otherwise be interpreted as a wild-card character) \_ A `_' character (this is used to search for literal instances of `_' in contexts where `_' would otherwise be interpreted as a wild-card character) Note: The wild-cards only have to be escaped in the search criterion for the select ... where ... Every possible 256 byte values can be stored. The input display of the data is where things get sticky. In a raw interface how do you indicate to the program where to stop input start proccessing ? Is the backspace to be stored, or did you make a mistake ? And how can you tell there was a backspace if it was stored ? The \b 0x8 notation is a convienient way to enter and display, but not store, the special characters The lower 32 ASCII values were(are) called control characters because they control device specific things: CTRL+H = \b = 0x8 = ASCII BS = back space (overstrike) 1 char CTRL+G = \a = 0x7 = BEL = ring the out-of-paper bell. CTRL+L = \f = 0x0c = NP = top of form to next page. Very paper Tty 33 oriented ... Anyway, what is in the database how it's displayed is entirely up to the interface you use. In other words, am I correct that none of these characters can be stored in a MySQL string field (such as CHAR, VARCHAR, or TEXT)? No, you are confused about presentation storage. 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. - 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: re-sorting auto_increment fields
Thank goodness this is the position. If the capability of reordering the auto_increment existed, we could potentially have all of our databases broken by some inadvertant finger trouble. As you mentioned, there are better ways to handle this perceived problem, which appears that the auto_increment is being used for a purpose it was not intended for... --- Tonu Samuel wrote: Kif wrote: Hi ANy idea how i can get my auto_increment fields to renumber themselves after deletion of records so that they all get re-ordered and run consecutively from 1 to whatever without any numbers missing ? Please help if you know how to do this I think we never will implement such stuff. auto_increment responsibility is to be unique and it should never appear back again when issued once. Idea is to identify record in database. If someone have right to reorder one table then relationships to other tables will be broken. auto_increment is totally technical field and if you do not like holes in it, programmer should use separate column for user-readable values additionally to auto_increment. -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 - 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: connecting to mysql using tcp/ip
Richard Gibbs wrote: sorry if this is the wrong list I am a beginner user of mysql, but a few pl I know are very active in scripting using mirc, especially gaming using tcp/ip connections to game servers to find out various details. I would like to know how/if I can connect to a mysql database using tcp/ip as mirc allows connections of this type. if anyone has a few hints and/or webpages I can look at to get a good idea of where to go with this it would help immensely. be warned, I am a beginner, but my friends are not so any help at all would be appreciated. No problem about being beginner. We all be beginners sometime. About question: it is pretty senseless. mIRC is IRC client software for Wnidows as much I know. I do not care if has some kind of scripting made on it but there is still no relationship with MySQL database. Yes MySQL uses TCP/IP but you are trying to make something incompatible by idea.If you need database, forget about mIRC. If you need IRC then it is not related to database I believe. -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator /_/ /_/\_, /___/\___\_\___/ Hong Kong, China ___/ 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
Re: mysqld as a library in 4.0
Brian P Austin wrote: Has anyone seen any documentation for using mysqld as a library. I am building an embedded device on a machZ chipset, and I would really like to be able to use mysql for some internal querying of our data collection. I can get it to run (barely) as is, but need more room and memory for other parts of the device. Yes, it is possible to use MySQL server as library and link it to your application. But please do not kill me if I am wrong (I am technician, not business man) but I have smoewhere in my memory that this required some special license. I Cc: it to licensing, they should tell if I am wrong. -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Security Administrator /_/ /_/\_, /___/\___\_\___/ Hong Kong, China ___/ 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
Where is the MySQL-DBI-perl-bin RPM?
$ rpm --test -i MySQL-bench-3.23.39-1.i386.rpm error: failed dependencies: MySQL-DBI-perl-bin is needed by MySQL-bench-3.23.39-1 Where is the MySQL-DBI-perl-bin RPM? Thank you. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Where is the MySQL-DBI-perl-bin RPM?
$ rpm --test -i MySQL-bench-3.23.39-1.i386.rpm error: failed dependencies: MySQL-DBI-perl-bin is needed by MySQL-bench-3.23.39-1 Where is the MySQL-DBI-perl-bin RPM? Thank you. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Multiple users.
they can't access them! are you sure about that? indeed, if a user is logged on to the web host, he is acting in the environment imposed by the operating system on the user session. in this case, the other databases - given that the correct permissions are established - can not be accessed. but consider the case where the database is accessed thru a web page. Dubois briefly discusses this topic in MySQL. Now the user - any user - is running as whatever the web page server is running as. so if user A wants to provide web access to his database, the login name and password must be available to the user that the web page server runs as. so i can write a script, invoke it thru the web server and read user A's cnf file which gives me his login name and password. I just got access. I'm trying to figure out a solution to this problem. If anyone has a solution, i would really appreciate the answer. I have a solution to prevent modifying the database, but it is really ugly - full of security holes. i do not have a solution to prevent reading the database. my web host is running linux with an apache web server. thanks At 04:54 AM 7/7/01 -0600, you wrote: Why does it matter? They can't access them, so what harm is there? I am sure that it has been asked before. I am running a hosting company and I am running mysql on a win2k server. We don't want any customer to see other db's of any other customer, we just want them to see their own db's only. But even if you connect with a username who has access to only one db, when you type show databases you can see all other databases easily. Is there any solution to this problem? Omer Barlas [EMAIL PROTECTED] www.emedia.gen.tr - 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 -- tom marlin [EMAIL PROTECTED] fax / voice mail: 714 507 3802 ext 4881 Never be afraid to try something new. Remember that - amateurs built the ark. - professionals built the Titanic.
Re: F IRST TIME USER
actually you are already using mysql. what you need to do is specify a database to use. to see the available databases, type show databases; then type use db name note, no ; if none of the existing databases are appropriate you must create a database. but this is another chapter. hth At 02:38 PM 7/7/01 +, you wrote: Hi everybody I am still having problem.. please help I am able to connect to my remote mysql server but fail to create, user any database ... I let you know step by step.. what I have done 1. First I have connected to my remote server through Telnet. After becoming root... I had supplied following command... 2. mysql -h mydomainname -u root -p it prompts for password : it is blank so I just pressed enter. and Mysql prompt appeared.. mysql Then I typed 3. mysql use mysql; Result : - ERROR 1045 Access deneid for user [EMAIL PROTECTED] using password : no Can you please help me in this regards? Thanks Anoop Buy Feng Shui Package for Rs. 151/- only, at http://shopping.rediff.com/shopping/fengshui_mailer.htm - 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 -- tom marlin [EMAIL PROTECTED] fax / voice mail: 714 507 3802 ext 4881 Never be afraid to try something new. Remember that - amateurs built the ark. - professionals built the Titanic.
Re: Localization with MySQL
my only comment on this is that although you appear to have two different problems - you don't! pick a single solution to both cases; then when your solution needs modification, you only have one set of code to change. this obviously is computer science; only tenuously related to mysql. At 02:55 PM 7/7/01 -0600, you wrote: I'm working on two projects for which I'm trying to build in functionality to localize or internationalize later. For one project, a large chunk of text would be translated into an unknown number of languages. For this I'm allowing the text to be a 'text' field in a record, with other fields holding the language code (i.e. 'en', 'fr') and another the charset for that language. For the second, only a set of keywords would be translated into a small number of languages. For this project I'm using one record per keyword, with the various language translations being separate fields within the record - the record 'id' is what drives searches in this case. I'm using an Apache server with Perl and PHP, and MySQL as a db (of course). The only steps I'm taking is to have a field specifying the language (in the first case) and to name the columns/fields by the language code (i.e. 'en', 'de, 'jp') in the second. I'm also allowing twice as many characters for the 'jp' field, since that language requires (as I understand it) 'double' characters to drive it. I intend to drive the content by (1) selecting the language according to the 'Accept-Language' variable in the user's browser OR (2) allowing the user to select a language manually. Obviously I'm not up to speed on the exact requirements of localization and using other languages, and am concerned more about some pedestrian basics first - I'm just trying to avoid painting myself into a corner. Is there anything else I should be doing, or doing different? Can you point me to any resources on localization that would help me build this right the first time? Thank you for any assistance, Nelson -- - 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 -- tom marlin [EMAIL PROTECTED] fax / voice mail: 714 507 3802 ext 4881 Never be afraid to try something new. Remember that - amateurs built the ark. - professionals built the Titanic.
Re: re-sorting auto_increment fields
there is a way: delete the column add the column then the auto increment will start from 1 up to the number of records. be careful! if there are records in other tables which refer the records in this table - the one being modified - those records WILL NOT BE UPDATED. and now your database is really broken. you can postpone this problem for a very long time by using an unsigned bigint (0 - 2**64-1) note i said postpone, not eliminate. hth At 11:31 PM 7/7/01 +0100, you wrote: Hi ANy idea how i can get my auto_increment fields to renumber themselves after deletion of records so that they all get re-ordered and run consecutively from 1 to whatever without any numbers missing ? Please help if you know how to do this Thanks Keith White -- tom marlin [EMAIL PROTECTED] fax / voice mail: 714 507 3802 ext 4881 Never be afraid to try something new. Remember that - amateurs built the ark. - professionals built the Titanic.
Re: Searching records ?'s
indexing the entire large text column really drags performance down, and consumes big hunks of disk space. mysql has a good regexp facility. rtfm At 10:52 PM 7/6/01 -0700, you wrote: Hi Everyone, I'm writing a script using perl for a search function. I have a large text column that I want to scan for certain words. I do something like the following: select * from table_name where column_1 LIKE %word1% AND column_1 LIKE %word2%; In this situation, words like 'tree' will return 'streets'. How can I find exact matches while still scanning the entire record? Are there any MySQL REGEX's that might help out. I'm considering indexing the entire column and compare my query against it but wanted to see if there were any other solutions out there. Thanks! Eric - 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 -- tom marlin [EMAIL PROTECTED] fax / voice mail: 714 507 3802 ext 4881 Never be afraid to try something new. Remember that - amateurs built the ark. - professionals built the Titanic.
probably a stupid question but...
Hi I want to enforce unique records in one of my tables. The table goes like this: ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, customerID INT UNSIGNED, categoryname VARCHAR(20) With customer ID pointing to a customers table. I suddenly realized that one customer could input the same categoryname twice, which would create a duplicate entry in the database. (if you ignore the primary key). Is there something in MySQL, or in my table design, that can force unique records? Or will I have to check this with my code everytime I update the database? Thanks very much for any help! Much appreciated. - 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: probably a stupid question but...
Use an index. -- Jonah Klimack wrote: Hi I want to enforce unique records in one of my tables. The table goes like this: ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, customerID INT UNSIGNED, categoryname VARCHAR(20) With customer ID pointing to a customers table. I suddenly realized that one customer could input the same categoryname twice, which would create a duplicate entry in the database. (if you ignore the primary key). Is there something in MySQL, or in my table design, that can force unique records? Or will I have to check this with my code everytime I update the database? Thanks very much for any help! Much appreciated. - 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 -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 - 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
Announce: mytop 0.8 released...
mytop - a `top' clone for MySQL http://public.yahoo.com/~jzawodn/mytop/ About mytop is a console-based (non-gui) tool for monitoring the threads and overall performance of MySQL 3.22.x, 3.23.x, and 4.x servers. It runs on most Unix systems which have Perl, DBI, and Term::ReadKey installed. And with Term::ANSIColor installed you even get color. As of version 0.7, it even runs on Windows (somewhat). New in 0.8: Added a Queries Per Second or qps mode. You can enter qps mode by hitting the `m' key. In this mode, mytop will write out one integer per second. The number written reflects the number of queries executed by the server in the previous one second interval. mytop is now distributed as a true Perl package. There's a normal Makefile.PL, which means it can be installed via the standard mantra: perl Makefile.PL make make test make install This should make life a bit easier. It also means that you could install it using the CPAN shell. 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 21 days, processed 162,725,767 queries (86/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