Re: unixOBDC
On 3 Jan 2003, bruno peracchio wrote: I use MySQL 3.23.52/linux Mandrake 9.0 Installing SQLEditor-2.1.3 (CBD-Common-2.1.3-3.i386.rpm) error:failed dependencies: unixODBC is needed by CBC-Common-2.1.3-3 Installing UnixODBC-mysql-2.2.3-1.i386.rpm error: failed dependencies odbc is needed by UnixODBC-mysql-2.2.3-1 Please can you give me an answer? I think that this is more of RPM issue than it is a pure MySQL issue. RPM is a package management system that manages RPM packages. RPMs alone do not manage package dependencies. Thus, the process for installing a package called x.rpm could involve downloading x.rpm and attempting to install x.rpm only to find out that it needs a file called k.c. In order to figure out which package has the file called k.c, you might have to use something like rpm-find to figure out that the file that you are interested in is contained in a package called y.rpm. You could spend a lot of time doing this, because y.rpm might have the same problem. In your case unixODBC is needed. To search with rpm-find go here: http://rpmfind.net/ One package management tool that solves the dependency problem nicely is called apt-get, which was developed for the Debian GNU/Linux operating system. Debian has a tool called dpkg which is similar to RPM, in that it can be used to install binary .deb packages (as opposed to .rpm packages). However, Debian's package manager has a higher level command called apt-get, which manages dependencies based on packages, not files. You can run apt-get on top of an RPM system (it doen't seem to work as nicely as an .deb based system from my experience) and it might make things easier for you. Have a look here: http://freshrpms.net/apt/ If you want to try Debian go here: http://www.debian.org/ John - 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
Storing SSN's in MySQL
I need to store SSN's in a MySQL DB. I see a variety of encyption functions: ENCRYPT(), MD5(), SHA1(), DES_ENCRYPT() and have read the basiscs of how they work. Is there are standard way of storing SSN's in MySQL. thanks, John - 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
source?
I have to port a DB from a system with mysql_3.23.33 to a system with mysql_3.22.32. The older system does not seem to have the source command. root is too busy to talk to me. Do any of you know if disabling source is an option he could have used to keep his system more secure or is it a version issue? Most importantly is there any other way to import the table definitions besides by hand? I don't need to import the data in the old one, just the table definitions, which I have in a .mysql file. Thank you. John ps: this is the error I got: mysql source /rci/u1/hire/public_html/mysql/hats_extension.mysql - ; ERROR 1064: You have an error in your SQL syntax near 'source /rci/u1/hire/public_html/mysql/hats_extension.mysql' at line 1 mysql while on my system I got: mysql source /home/jfulton/public_html/ccf/mysql/hats_extension.mysql Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql - 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
Selecting set members
If I have a table with a set such as this: CREATE TABLE application ( application_num int(6) NOT NULL auto_increment, availability set('weekdays','weekends','mornings','afternoons') default NULL, PRIMARY KEY (application_num) ) TYPE=MyISAM; is it possible to search based on members of the set? For example, someone might have selected ('weekends,mornings') for their entry in this set, and I am interested in searching for people who are available in the morning. However running a query such as: mysql select * from application where availability = 'mornings'; would not return a person who is available for both weekends and mornings, since there set entry would be 'weekends,mornings'. Writing querys to try to cover all the posibilities such as: mysql select * from application where availability = 'mornings' or availability = 'weekends,mornings' or ... ; Seems like the wrong thing to do. Anyone have any ideas? I wouldn't be using sets if I could, but I am stuck with them for this prjoect. Thanks a lot, John - 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: Selecting set members
Neil, Thank you for giving me that idea. That exact syntax did not work with = but using like worked well. Problem solved. Thanks, John mysql select availability FROM application; +---+ | availability | +---+ | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekends,mornings | | weekends,mornings | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | +---+ 14 rows in set (0.00 sec) mysql mysql select availability from application where availability = '%afternoons%'; Empty set (0.00 sec) mysql mysql select availability from application where availability like '%afternoons%'; +---+ | availability | +---+ | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | | weekdays,weekends,mornings,afternoons,evenings,overnights | +---+ 12 rows in set (0.00 sec) mysql On Fri, 22 Feb 2002, Neil Silvester wrote: What about using wildcards? mysql select * from application where availability = '%mornings%'; Crude, but it should work. Neil -Original Message- From: John Fulton [mailto:[EMAIL PROTECTED]] Sent: Friday, 22 February 2002 7:49 AM To: [EMAIL PROTECTED] Subject: Selecting set members If I have a table with a set such as this: CREATE TABLE application ( application_num int(6) NOT NULL auto_increment, availability set('weekdays','weekends','mornings','afternoons') default NULL, PRIMARY KEY (application_num) ) TYPE=MyISAM; is it possible to search based on members of the set? For example, someone might have selected ('weekends,mornings') for their entry in this set, and I am interested in searching for people who are available in the morning. However running a query such as: mysql select * from application where availability = 'mornings'; would not return a person who is available for both weekends and mornings, since there set entry would be 'weekends,mornings'. Writing querys to try to cover all the posibilities such as: mysql select * from application where availability = 'mornings' or availability = 'weekends,mornings' or ... ; Seems like the wrong thing to do. Anyone have any ideas? I wouldn't be using sets if I could, but I am stuck with them for this prjoect. Thanks a lot, John - 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
inserting into sets
Would someone please tell me how to insert sets into a MySQL DB? e.g. insert into table_name (x) values ('a', 'b', 'c', 'd'); , where x is a set. I am unsure on what should be inside of the second set of parentheses. Sorry to be posting a syntax question to the list, but I don't see it spelled out in the manual, or at least I am unable to figure it out if it is there, and I thought that it would be easy to answer for one of you. I have wasted lots of time searching the web for the syntax, as well as experimenting, with no results. Thanks, John PS: Here is what I am trying to do in more detail if it helps. mysql describe applicant_ext_skills; +---++--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---++--+-+-+---+ | applicant_num | int(5) | | PRI | 0 | | | unix_arr | set('rlogin','ls','cd','more','kill','cp','mv','rm','mkdir','pwd','rmdir','chmod','quota','du','lprm','man','ftp','grep','ps','lpq','lpr','pipe','redirect','mpage','newuser') | YES | | NULL| | +---++--+-+-+---+ mysql insert into applicant_ext_skills (applicant_num, unix_arr) values (3, 'rlogin', 'ls', 'cd', 'more', 'kill', 'cp', 'mv', 'rm', 'mkdir'); Query OK, 1 row affected (0.00 sec) mysql Where the collection of unix commands is the set I am trying to insert. However, nothing seems to be getting stored. mysql select applicant_num from applicant_ext_skills; +---+ | applicant_num | +---+ | 0 | | 1 | | 2 | | 3 | +---+ 4 rows in set (0.00 sec) mysql select unix_arr from applicant_ext_skills; +--+ | unix_arr | +--+ | NULL | | | | | | | +--+ 4 rows in set (0.00 sec) mysql - 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