curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

DBD::MYSQL Does anyone use this to write to mysql on a RPI?

Thu May 16, 2013 1:55 pm

DBD::MYSQL Does anyone use this to write to mysql on a RPI?

I have been look for a way to write 2 values to a mysql database i host on the internet.
What is the best way to do this as i have tried to install lots of modules for PERL which dont seems to install the DBD:mysql part due to a DBI issue apparently!

ive tried lots of things but i am losing the will to live with it
can anyone suggest a better way to write to a mysql database on the internet from a raspberry PI?

thank you

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Thu May 16, 2013 6:28 pm

This is what i get when i try to follow the guide on http://search.cpan.org/~capttofu/DBD-my ... D/mysql.pm
[email protected] ~/DBIstuff/DBD-mysql-4.023 $ perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 83.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'pi' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'pi'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 479.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help

does anyone know whats up with my OS/ PERL or DBD / DBI from the errors i get when i try to PERL Makefile.PL?
thanks

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Thu May 16, 2013 6:30 pm

and this when i try to run a code with

Code: Select all

USE DBI 
USE DBD::mysql
on the first few lines
[email protected] ~/temperature2 $ sudo perl sqlupdate.pl
Can't locate DBD/mysql.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at sqlupdate.pl line 6.
BEGIN failed--compilation aborted at sqlupdate.pl line 6.

Gibble
Posts: 56
Joined: Wed May 09, 2012 9:52 am

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Fri May 17, 2013 7:14 pm

Not sure if you're overcomplicating things..

sudo apt-get install libdbd-mysql-perl

Shout if you get any errors.

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Mon May 20, 2013 11:10 am

thanks gibble :)
the software works now.

davidtuti
Posts: 86
Joined: Tue Oct 22, 2013 6:21 am

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Sat Mar 01, 2014 11:14 pm

Hi,
When I try to install these package in the raspberry freezes and I cant install
Any help?

hoholok
Posts: 2
Joined: Tue Sep 03, 2013 11:19 am

Re: DBD::MYSQL Does anyone use this to write to mysql on a R

Sun Sep 13, 2015 3:51 am

davidtuti wrote:Hi,
When I try to install these package in the raspberry freezes and I cant install
Any help?
i have the same problem in arch. I tried install DBI through CPAN, and it also can't find it.
don't know what to do, really don't want to install DBI from source, but it seems like the only working way :c

Return to “General programming discussion”