Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,429 Views

How to use mariadb with Python

maybe one of you guys can help me. i am trying to access the mariaDb over python

status so far:

mariadb is up and running

installed packages:

mariadb-client - 5.5.43-r0

mariadb-leftovers - 5.5.43-r0

mariadb-server - 5.5.43-r0

and for sql:

libmysqlclient-dev - 5.5.43-r0

libmysqlclient18 - 5.5.43-r0

libmysqld18 - 5.5.43-r0

libsqlite3-0 - 3:3.8.6.0-r0

libsqlite3-dev - 3:3.8.6.0-r0

i installed the pip tool, but when i execute "pip install MySQLdb" it gives the error message that it cant find an appropriate version

anyone know more? thank you guys

0 Kudos
7 Replies
Highlighted
Employee
23 Views

Hello AngelFromHell,

Did you download the packages from the AlexT's repo? If so, why don't you try building them from source, you might get different results.

I will post a couple of links that you might find helpful.

https://dev.mysql.com/doc/refman/5.1/en/source-installation.html MySQL :: MySQL 5.1 Reference Manual :: 2.11 Installing MySQL from Source

https://downloads.mariadb.org/interstitial/mariadb-10.1.7/source/mariadb-10.1.7.tar.gz/from/http:/mi... https://downloads.mariadb.org/interstitial/mariadb-10.1.7/source/mariadb-10.1.7.tar.gz/from/http:/mi...

Peter.

Highlighted
Novice
23 Views

Hello Peter,

yes i did and so far everything run out if the box..

hoped their would be a simple solution ;-)

but lets give it a try

Angel

Highlighted
Employee
23 Views

I see… I suggested to build the packages from source because, I've had some issues (not sure why) with some packages that I downloaded from AlexT's repo when I used them as dependencies for other packages (not found on AlexT's repo). So, I thought you might be having a similar behavior. Try it and let us know how it goes.

Peter.

0 Kudos
Highlighted
Novice
23 Views

well it could be that he uses a slightly different kernel image... i found a thread about that..

0 Kudos
Highlighted
Employee
23 Views

It could be, so, I believe the best approach for this cases are to build it from source. Try it and let us know what happens.

Peter.

0 Kudos
Highlighted
Novice
23 Views

ok now i got it working... i forgot the libmysqlclient-r, however i cant remember that one was yesterday already in alex repo And i still got an error that a link as missing

now it looks like ... although some of the packages might still be superfluous

opkg update

opkg upgrade

opkg install git

opkg install python-pip

opkg install mariadb

opkg install libmysqlclient-r

opkg install libmysqlclient-dev

opkg install libmysqlclient18

opkg install libmysqld18

opkg install apache2

--- not really sure if this was an issue but it solved the problem ---

cd /usr/lib

ln -s libmysqlclient_r.so.18 libmysqlclient_r.so

pip install MySQL-python

thanks peter for your help

0 Kudos
Highlighted
Employee
23 Views

Anytime

I'm glad the issue was solved. If you ever have any other issue, don't hesitate to come back to the community, we are here to help.

Peter

0 Kudos