backmailingbox
Posts: 45
Joined: Tue Jan 19, 2016 2:30 pm

which SQL for Python 3 on raspbian

Sat Oct 21, 2017 7:01 pm

I want to use sql database. But which one? My code is written in Python 3.4
I have read about problems with MySQL, postgre?
Is here anybody who use any SQL database on raspbian and python 3 ?
Thanks

User avatar
The Traveler
Posts: 74
Joined: Sat Oct 21, 2017 3:48 pm

Re: which SQL for Python 3 on raspbian

Sat Oct 21, 2017 8:17 pm

I like sqlite3 for RPi projects. Small footprint, few dependencies, good performance and works very well with Python 3. if you can do with a few command omissions I recommend it: https://www.sqlite.org/omitted.html

Cheers
"Your Google-fu is weak Grasshopper. It is not the answer that enlightens, but the research.”

backmailingbox
Posts: 45
Joined: Tue Jan 19, 2016 2:30 pm

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 7:09 am

is there really NO sql for python3/raspbian? I use sqlite, I use it just now.
I need access from outside to the database, sqllite is only local db so it is not solution of my problem.
Again and again I can see that raspbian is disaster with elementary problems

User avatar
rpdom
Posts: 11835
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 7:53 am

backmailingbox wrote:
Sun Oct 22, 2017 7:09 am
Again and again I can see that raspbian is disaster with elementary problems
What on earth are you talking about?

Raspbian is basically Debian for the Pi. Search on SQL for Debian and you will get plenty of options like MariaDB (replacement for MySQL) and Postgresql. Even some NoSQL options are available.

backmailingbox
Posts: 45
Joined: Tue Jan 19, 2016 2:30 pm

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 8:08 am

I am speaking about disaster.... can you send here link about postgre or mariadb instalation steps?
I found one about postgre... cca 30-40 cmd lines which I have to do. Do you think that it is standard way how to install something on PC in 2017?
Also I was searching about Mariadb and found nothing. Please send link or write how to do... It is disaster ... my opinion

User avatar
rpdom
Posts: 11835
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 8:18 am

Sigh, everyone else seems to manage ok. Use the package manager in the GUI (add/remove programs or whatever it is called), or simple command line "sudo apt-get install -y mariadb-server". Then you may need to do some setting up to create databases.

backmailingbox
Posts: 45
Joined: Tue Jan 19, 2016 2:30 pm

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 8:27 am

can you send me a link or better 2 links? One for instalation steps for mariadb and second one for python3 mariadb connection example?


anybody any help? really such big problem on raspi?

User avatar
The Traveler
Posts: 74
Joined: Sat Oct 21, 2017 3:48 pm

Re: which SQL for Python 3 on raspbian

Sun Oct 22, 2017 10:48 pm

It's not a big problem to install or use. Google for "python 3 and mariadb". The first listing should teach you the basics you need to get things installed and connected.

Cheers.
"Your Google-fu is weak Grasshopper. It is not the answer that enlightens, but the research.”

backmailingbox
Posts: 45
Joined: Tue Jan 19, 2016 2:30 pm

Re: which SQL for Python 3 on raspbian

Sun Nov 19, 2017 8:14 pm

after many days of troubles I was not able to run python 3 with mysql.
I moved my code to python 2 and succesfully connected to mysql.
it was disaster but ok. it was running.
but now I moved to raspbian stretch and there is mariadb, not mysql.
and again and again I am not able to connect from python 2 to mariadb.
is anybody here who was succeeded?

Return to “Python”

Who is online

Users browsing this forum: SpencerXZX and 12 guests