myODBC connect problems
Hi, I would appreciate help on the following. I have installed myODBC 3.51 on my Windows 2000 computer. I am trying to connect mysql database on a linux server. I configured the ODBC data source adminstrator from the administrative tools. After trying to add a new data source and entering all of the appropriate fields I get the error "Lost connection to MySQL server during query" The error shows up immediately. The only change I made was to change the port to 22. I use port 22 when I try to make a putty connection or WinSCP. I have no problems connecting to the server when using this method. I also don't have any problems connecting to the database after connecting with putty or using mysqlcc. I tried to used the default method of using port of 3306 and I get an error as well "Can't connect to MySQL server on ..." I am not sure what the problem is? thanks very much. - Post your free ad now! Yahoo! Canada Personals
Re: Initiate perl script in linux from a Windows VBA program
Thanks for the response. Does this mean that I would not use perl and only program in VBA? If I do need perl does it have to be installed on the Windows side? Where can I get some examples with ODBC in VBA? thanks. Mike Hillyer <[EMAIL PROTECTED]> wrote: Annie Law wrote: > Hi,I would appreciate help with the following. I would like to be ableto initiate a > perl script that is residing on a linux server from anExcel workbook. I am working > on the Excel workbook in Windows. Iwould appreciate any pointers, sample code for > accomplishing this inVBA or some other method.The perl script that I am trying to > call will take the informationfrom a mysql database and update the Excel sheet.The > script will also take information from the Excel sheet and updatethe database.thanks > very much. > > > > > - > Post your free ad now! Yahoo! Canada Personals > Why wouldn't you just use ODBC to connect to the server and work directly? Remotely initiating a perl script would involve creating a telnet or SSH session from within Excel using VBA, which would be a far more complex undertaking. -- Mike Hillyer, Technical Writer MySQL AB, www.mysql.com Office: +1 403-380-6535 "The Open Source movement has become a major force across the software industry, and MySQL is the world's most popular open source database." --Fortune Magazine begin:vcard fn:Mike Hillyer n:Hillyer;Mike org:MySQL AB;Documentation Team adr:;;Canada email;internet:[EMAIL PROTECTED] title:Technical Writer tel;work:+1 403 686 tel;home:+1 403 380 6535 tel;cell:+1 403 894 6535 x-mozilla-html:FALSE url:http://www.mysql.com version:2.1 end:vcard - Post your free ad now! Yahoo! Canada Personals
Initiate perl script in linux from a Windows VBA program
Hi,I would appreciate help with the following. I would like to be ableto initiate a perl script that is residing on a linux server from anExcel workbook. I am working on the Excel workbook in Windows. Iwould appreciate any pointers, sample code for accomplishing this inVBA or some other method.The perl script that I am trying to call will take the informationfrom a mysql database and update the Excel sheet.The script will also take information from the Excel sheet and updatethe database.thanks very much. - Post your free ad now! Yahoo! Canada Personals
parsing a column
Hi, I would appreciate help on the following. I have a column in a table. Each entry in the column can have 0,1,2,3... maybe four entries in it. I would like to parse the column and grab each of the entries and feed it into another select statement. This entry that needs to be parsed would be found through a select statement. I would like to know what a good way is for doing this. For example an entry in the column may be AI732541 AI791498 AA508861 another entry may be AA508867 Basically, in the first example AI732541 AI791498 AA508861 would be the the answer ie. access_num for my first select statement Select access_num from inventory where prod_id = current_prod_id; I would like to parse the entry to allow me to access AI732541 to feed into another select statement find out the answer and capture in a variable. Then I would like to be able to access the next entry AI791498 and perform the same task of feeding it into another select statement and capturing the answer in a variable an so on. thanks in advance - Post your free ad now! Yahoo! Canada Personals
Strings and variables in select statements
Hi, I would appreciate help with the following. I have a table where each of the values in a column consists of a combination of letters and numbers followed by a decimal then a single digit. Examples of the two types of entries that could be found in this column(accession_num) are: BQ877252.1 AA3588976.2 and possibly T84780 The entries above are found in a table called hs_identifiers. The hs_identifiers table has two columns accession_num and hs_id_num. Given an accession_num I want to be able to look up in the hs_identifiers table to look up for the corresponding hs_id_num. This would be a simple select statement for example Select hs_identifiers.hs_id_num from hs_identifiers, where (accession_num = (result of another select statement)._) or (accession_num=(result of another select statement)); The only thing is I am not sure what the syntax is for the part (accession_num = (result of another select statement)._) In the section (result of another select statement)._) I am trying to say the result concatenated with a period concatenated with one wild card character. For example: result of another select statement = BQ877252 period is '.' and wild card character 1,2,3, etc. The whole string concatenated together would be BQ877252.1 thanks, Annie. - Post your free ad now! Yahoo! Canada Personals
Application using mysql, perl, Excel
Hi, I would appreciate help on the following. I would like to create a small application that would involve Excel XP on Windows 2000, and perl and mysql on RedHat linux 9.0 The front end of the application will be Excel since it has a lot of useful functions. Columns from the Excel sheet will be used to update the mysql database. Data from the mysql database will also be used to update the Excel sheet. I am trying to map things out and see if all of the parts in my application will fit together prior to doing too much developing. Basically my main concern now is to create the flow of information. There is the Excel workbook part and then there is the UNIX mysql database part. Writing a shell or perl script in the linux environment that will ftp files from an external source that will be used to update the mysql database. They will be flat files. I will use perl to parse the data. Then use perl DBI to insert to information Also using perl DBI to upload information from the Excel sheet (user's personal annotation) Into the database. The part that I'm not too sure about is how to send the information from the Excel sheet to the database And how to grab the information from the database and update the Excel sheet. On top of that I am using two different operating systems. Are there some tools in VBA or in perl that I could use to build this bridge? Is this a practical solution? Thanks for your help, - Post your free ad now! Yahoo! Canada Personals
Re: Starting up MySQL :(
Thanks for your reponses but I tried both of the suggestions below and still had problems. I killed mysql and then I used "/etc/init.d/mysql start" I was able to use mysql --user=mysql and get into mysql However when I tried to create a database I get "ERROR 1044: Access denied for user: '@localhost' to database mydata " If I try mysql --user=root then I get "ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)" Then after killing the process again I tried the next suggestion of I still cannot do mysql_install_db since it seems to shutdown the second I entered the command but I think this step is neccessary to set up the grant tables. I then proceed anyways to /usr/bin/safe_mysqld --user=root --password=YOURPASS & However I don't user a password as it seems that it does not recognize the variable --password. It then says Starting mysqld-max daemon with databases from /var/lib mysql but hangs until I hit the enter key. I then try mysql --user=root and I get the Access denied 1045 error I can try as user mysql but still can't start it. What am I missing? Also, is it important restart the linux server if I have already killed the mysql processes? thanks very much Annie Law wrote:> > Hi,> > I would appreciate any help on the following. I have searched the mailing list for> information But have not come up with a solution for my situation which has been> frustrating. I think I need some things need to be clarified.> > The OS that is running is RedHat V.9.0 linux. MySQL was installed when RedHat V.9.0> was installed. Here are the packages that that I have installed> Annie,There should be a startup/stop script for mysql in /etc/init.d/ . Tryrunning"/etc/init.d/mysql stop"After that, check for mysql with "ps -eaf |grep -i mysq" . If you find aprocess running, try to kill it with "kill -15 pid". You may have to use"kill -9 pid" if the processes wont go away with -15. You should be ableto start mysql using "/etc/init.d/mysql start". Once the server isrunning, su to the mysql user and you should be able to log in to thedatabase using "mysql".walt - Annie Law wrote:> First, I went to the MySQL website to look up the section> on Unix Post-installation Procedures. I then tried the> following as root and got the following result:>> --> ->> Shell> cd /usr/bin>> Shell> mysql_install_dbIf you do this as root then you only be able to start mysqldas root> To start mysqld at boot time you have to copy> support-files/mysql.server to the right place for your> systemRedHat has a init script for all the services that wereinstalled by anaconda, there is one for mysqld in/etc/rc.d/init.d, if you have configured mysql to star atthe boot time this script uses /etc/my.cnf for the user andpasswords needed to start mysqld.> You can start the MySQL daemon with:>> cd / ; /usr/bin/mysqld_safe &Again if you was root when did mysql_install_db then youshould do this to start mysqld if this wasn't started atboot time:--/usr/bin/safe_mysqld --user=root --password=YOURPASS &--If you are going to use mysql in a exposed server then isvery insecure run it as root.CheersUsuario Linux #323140celiseATprodigy.net.mx - Post your free ad now! Yahoo! Canada Personals
Starting up MySQL :(
Hi, I would appreciate any help on the following. I have searched the mailing list for information But have not come up with a solution for my situation which has been frustrating. I think I need some things need to be clarified. The OS that is running is RedHat V.9.0 linux. MySQL was installed when RedHat V.9.0 was installed. Here are the packages that that I have installed Shell> rpm -qa | grep -i mysql MySQL-server-4.0.15-0 MySQL-shared-4.0.15-0 mod_auth_mysql-1.11-12 perl-DBD-MySQL-2.1021-3 MySQL-shared-compat-4.0.15-0 MySQL-client-4.0.15-0 MySQL-Max-4.0.15-0 php-mysql-4.2.2-17 MySQL-devel-4.0.15-0 MySQL-bench-4.0.15-0 First, I went to the MySQL website to look up the section on Unix Post-installation Procedures. I then tried the following as root and got the following result: --- Shell> cd /usr/bin Shell> mysql_install_db Installing all prepared tables 040120 12:00:51 /usr/sbin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h yourserver.ca password 'new-password' See the manual for more instructions. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be able to use the new GRANT command! You can start the MySQL daemon with: cd / ; /usr/bin/mysqld_safe & You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! Shell> mysqld_safe --user=mysql & Starting mysqld-max daemon with databases from /var/lib/mysql mysqld ended I get the exact same response if I do su mysql first as well. The error log mysqld has the following as the most recent entry. 040120 12:01:05 mysqld started 040120 12:01:05 Can't start server: Bind on TCP/IP port: Address already in use 040120 12:01:05 Do you already have another mysqld server running on port: 3306 ? 040120 12:01:05 Aborting 040120 12:01:05 /usr/sbin/mysqld-max: Shutdown Complete 040120 12:01:05 mysqld ended I have already tried If I try something like Shell> service mysqld start I get Mysqld: unrecognized service I have tried things such as: shell> groupadd mysql shell> useradd -g mysql mysql shell> chown -R mysql /var/lib/mysql shell> chgrp -R mysql /var/lib/mysql shell> chown -R root /usr/local/mysqlcc-0.9.3-linux-glibc23 shell> chgrp -R mysql /usr/local/mysqlcc-0.9.3-linux-glibc23 shell> /usr/local/mysql/bin/mysqld_safe --user=mysql & I have also typed in Shell> mysql I get Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I tried to see is MySQL was running by typing in Shell> ps -eaf |grep -i mysqld root 14437 13954 0 Jan19 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --user=mysql mysql 14463 14437 0 Jan19 pts/0 00:01:13 [mysqld-max] root 16210 16183 0 14:34 pts/1 00:00:00 grep -i mysqld I am not sure how to be able to start MySQL running and using it. I have tried a number of things. Thanks very much for your help. - Post your free ad now! Yahoo! Canada Personals