DBD::Mysql on Mac OS X
I am trying to install mysql, DBI, and DBD::mysql on MacOS X. My problems are in the DBI and DBD::mysql part. Has anyone successfully installed the DBI and DBD::mysql perl modules on this platform? I'm running into troubles in the fact that, god bless them, whoever decided to put unix on a mac, decided that, hey! You don't need a compiler! :-) So I've been looking around for binary versions of DBD::mysql.. to no avail.. nor can I find a binary version of the crap which you would normally use to install products/modules from source! Anyone have any pointers (meaning can you point me in the right direction) or suggestions as to how I can allow the perl product that I have installed use mysql? (comments like Get a real OS won't be usefull, because it's a clients machine). TIA! -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: Procedures
Seung-woo, I understand the point you are making, a stored procedures is a group of queries that can be executed together like a function. As you have said if you can [write] SQL and Perl programs, you could write a function that works like stored procedures in MS SQL server or Oracle. My issue is stated in the first paragraph of chapter 15 of the MySQL manual: In MySQL, you can define a procedure in C++ that can access and modify the data in a query before it is sent to the client. What you have suggested is writing my own function which acts like a stored procedure. But the very part I am trying to accomplish is the part which writing my own function does not address, and that is to have the data access and modified before it is sent back to the client. Thanks for you response, though! Any little bit helps! John Hi: You will need DBI, DBD::mysql modules. I think you have some misunderstanding about what stored procedures are. A stored procedure is just a group of queries that can be executed together like a function in Perl or C/C++. So if you can wirte SQL and Perl programs, you could write a function that works like stored procedure in MS SQL server or Oracle. The only difference is that those big database systems have built-in facilities that let you write those functions without a help of other programming languages. I hope this helps. Seung-woo Nam John Tsangaris wrote: Do you know exactly what the package name is? I have searched cpan and have found nothing dealing with stored procedures. Here is what the mysql manual has for procedures: http://www.mysql.com/documentation/mysql/bychapter/manual_Adding_procedures.html#Adding_procedures http://www.mysql.com/documentation/mysql/bychapter/manual_Adding_procedures.html As you can see, it uses only c++. Do you have any other resources regarding stored procedures in perl? I'm a mid level engineer (not an expert, not a beginner) but I have never contributed to any open source projects before. How and where would I start to write an interface (and the ability) for perl to also be used for stored procedures? John On Mon, 11 Jun 2001 16:00:32 -0400, Seung-woo Nam wrote: Hi: There is a perl module for MySQL you can download from cpan. It provides the interface to MySQL database you can use to connect, execute SQL statements from perl programs. Seung-woo Nam John Tsangaris wrote: From the docs, it doesn't look like too much has been done in the area of stored procedures. Are there any resources which would teach me or point me in the right direction to writing procedures for mysql? The manual mentions that it has facility for c++ procedures, but if you want to learn how to write them, you have to look at the code. Also, I have seen reference to Mylua which is a scripting language which allows the writing of procedures. Is there anything perlish? If not, how do I go about writing a perl interface for procedures? jvt Hi: You will need DBI, DBD::mysql modules. I think you have some misunderstanding about what stored procedures are. A stored procedure is just a group of queries that can be executed together like a function in Perl or C/C++. So if you can wirte SQL and Perl programs, you could write a function that works like stored procedure in MS SQL server or Oracle. The only difference is that those big database systems have built-in facilities that let you write those functions without a help of other programming languages. I hope this helps. Seung-woo Nam John Tsangaris wrote: Do you know exactly what the package name is? I have searched cpan and have found nothing dealing with stored procedures. Here is what the mysql manual has for procedures: http://www.mysql.com/documentation/mysql/bychapter/manual_Adding_procedures.html#Adding_procedures http://www.mysql.com/documentation/mysql/bychapter/manual_Adding_procedures.html As you can see, it uses only c++. Do you have any other resources regarding stored procedures in perl? I'm a mid level engineer (not an expert, not a beginner) but I have never contributed to any open source projects before. How and where would I start to write an interface (and the ability) for perl to also be used for stored procedures? John On Mon, 11 Jun 2001 16:00:32 -0400, Seung-woo Nam wrote: Hi: There is a perl module for MySQL you can download from cpan. It provides the interface to MySQL database you can use to connect, execute SQL statements from perl programs. Seung-woo Nam John Tsangaris wrote: From the docs, it doesn't look like too much has been done in the area of stored procedures. Are there any resources which would teach me or point me in the right direction to writing procedures for mysql? The manual mentions that it has facility for c++ procedures, but if you want to learn how
Procedures
From the docs, it doesn't look like too much has been done in the area of stored procedures. Are there any resources which would teach me or point me in the right direction to writing procedures for mysql? The manual mentions that it has facility for c++ procedures, but if you want to learn how to write them, you have to look at the code. Also, I have seen reference to Mylua which is a scripting language which allows the writing of procedures. Is there anything perlish? If not, how do I go about writing a perl interface for procedures? jvt - Before posting, please check: http://www.mysql.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
DBD::mysql
I am trying to install DBD::mysql on a server which does not have mysql on it. ( The script will be accessing a mysql database on another server). The problem is, when I try to install dbd::mysql I am asked several questions.. one of which being: what is the path to mysql? I don't have a path to mysql as it is not installed and I don't want to install it. Is there a way to install DBD::mysql without having to install mysql? 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
auto_increment
If I turn on auto increment and let it do it's thing and then later on delete a few of the entries (let's say 1, 2, 3) and the current high entry has an id of 45.. why does mysql continue with 46 instead of using up 1, 2, and 3 first? Is there a way to bypass this? 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: auto_increment
I'm converting a product over to mysql from flat file. The guru of the perl/flat file asked about it (he's my senior) so I had to check into it because the flat-file system reused deleted numbers. If it's not worth the work to change it then I tell him it's not worth the work to change it. :) Just checking my options. John -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:35 PM To: John Tsangaris; Atle Veka Cc: [EMAIL PROTECTED] Subject: RE: auto_increment Just curious, is there a specific business rule that requires you to have a contiguous list or do you just not like holes in the list? Cal http://www.calevans.com -Original Message- From: John Tsangaris [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 7:12 PM To: Atle Veka; John Tsangaris Cc: [EMAIL PROTECTED] Subject: RE: auto_increment I'm using 3.22.23 :/ I think I may have to implement my own auto_increment to capture deleted id's. Thanx. John -Original Message- From: Atle Veka [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 1:53 PM To: John Tsangaris Cc: [EMAIL PROTECTED] Subject: Re: auto_increment what version of mysql are you using? AFAIK, this behavior is only supported in 3.23.x Atle On Mon, 26 Feb 2001, John Tsangaris wrote: If I turn on auto increment and let it do it's thing and then later on delete a few of the entries (let's say 1, 2, 3) and the current high entry has an id of 45.. why does mysql continue with 46 instead of using up 1, 2, and 3 first? Is there a way to bypass this? 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 - Before posting, please check: http://www.mysql.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
Perl DBI
Is it possible to connect to mysql without connecting directly to a database, check to see if a particular database exists, and if it doesn't exist create it? I have not been able to find a way of connecting to mysql without having a database already (I want perl to be able to make the db.. not have it already made before hand.) tia 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: Perl DBI
Hi, Eric. What I'm trying to do is have my install program check to see if a database of a certain name exists, if it does then the install needs to create another one (using a name given by the user), if not then it needs to create it with the original name. But I cannot figure out how to connect to mysql without already having a database setup. I'll use dbtemp as an example db. I can try to connect to dbtemp and if it successful, I know it exists. So I prompt the user to enter another db name. I can then check if this exists and if it doesn't I can use the dbi to create the new db WHILE I am still connected to dbtemp. If dbtemp does not exist I need to create it. The problem is dbi needs to connect to a database even to create another one. So what/how do I connect to initially to create that first database? I realize, for geeks (myself included), that you could simply create the db manually and then install the program.. but the program is to be usable by the layperson.. which means that there is a chance they don't know anything about mysql other than the guy on tech support said it's installed on the server. How do I connect to mysql without connecting to a database? John -Original Message- From: Eric Fitzgerald [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 1:21 PM To: John Tsangaris; [EMAIL PROTECTED] Subject: Re: Perl DBI Connect to the mysql database if you have access. It always exists. - Original Message - From: "John Tsangaris" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 16, 2001 1:58 PM Subject: Perl DBI Is it possible to connect to mysql without connecting directly to a database, check to see if a particular database exists, and if it doesn't exist create it? I have not been able to find a way of connecting to mysql without having a database already (I want perl to be able to make the db.. not have it already made before hand.) tia 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