Hot answers tagged

25

You're in luck! You should try SQLite. SQLite is very lightweight and implements a large subset of SQL. Your entire database is stored on a single file. And there is a perl API. Here's a link to SQLite's homepage ... SQLite To install only SQLite ... sudo apt-get install sqlite To install the perl API and SQLite (no need for the above) ... sudo apt-...


12

Easy answer: sudo apt-get install mysql-server You just forgot the -server string!! Good luck!


7

mysql has been replaced by mariadb in Debian10. Try default-mysql-server - although you can use mariadb. PS You can see what is available on your distribution e.g. apt-cache search mysql-server


6

I am running Apache, PHP, MyAdmin and MariaDB on a fresh install of Raspbian Stretch Lite using this sequence, and it works perfectly. Update sudo apt-get update && sudo apt-get upgrade install mariadb server and client sudo apt-get install mariadb-server mariadb-client install apache and php sudo apt-get install apache2 php5 libapache2-mod-php5 ...


6

You have to install the MySQLdb package: sudo apt-get update then sudo apt-get install python3-dev libmysqlclient-dev This took a while and finally: sudo pip3 install mysqlclient now it should work the following command: pi@raspberrypi:~ $ python3.5 Python 3.5.2 (default, Dec 15 2017, 15:32:37) [GCC 4.9.2] on linux Type "help", "copyright", "credits" ...


6

mariadb by defaults uses UNIX_SOCKET plugin to authenticate user root. https://mariadb.com/kb/en/mariadb/unix_socket-authentication-plugin/. It works by retrieving uid of the process that has connected to the socket and allowing to connect to the MariaDB account with the corresponding user name. In another word, if you are running your RPi as pi user, when ...


5

Checking on Raspbian 8 (jessie): > apt-cache search mysql-server mysql-server - MySQL database server (metapackage depending on the latest version) mysql-server-5.1 - MySQL database server binaries and system database setup mysql-server-5.5 - MySQL database server binaries and system database setup mysql-server-core-5.1 - MySQL database server binaries ...


4

Debian Stretch changed libmysqlclient-dev to libmariadbclient-dev. MariaDB is a fork of MySQL that's more friendly in the open source world. It's compatible as a drop-in replacement, although you might find the setup steps have changed. It's covered in this guide to installing WordPress on a Raspberry Pi.


4

MariaDB is a drop-in replacement for MySQL and should be mostly compatible to it. Unless you need a very specific feature of MySQL, MariaDB should work just fine. For more details about the compatibility of MySQL and MariaDB see the following two links: https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/ https://stackoverflow.com/questions/...


3

The NuGet package may not have passed testing yet for IoT. There seems to be one way to do this. Go to https://dev.mysql.com/downloads/connector/net/ and downlaod the .NET & Mono version, no install. You may have to go through registration to get the download. Extract the contents and manually reference the RT DLL (Don't forget to set copy on build ...


3

MySql libs are split into client and server in apt... Try: sudo apt-get install libmysqlclient-dev libmysqld-dev


3

I had the same problem with not being asked to enter the root password during installation. I found the answer here: Raspbian Stretch with MariaDB Note that even though mysql -u root -p does not work, it works when you put a sudo in front: sudo mysql -u root -p. Do that, and then run the following: sudo mysql -u root [mysql] use mysql; [mysql] update ...


3

mysqldump is part of mysql / mariadb client packages. For Raspbian Jessie install package 'mysql-client', for Stretch you need 'mariadb-client'


3

1) to be able to update the pi, I have set up scripts that check git-lab API once a day and download the repo when there is a new version. is this common, is it acceptable? Yes, also you can follow the procedure below. It's easy to create a scheduled script thanks to the "cron". 1. Create a file for the script: sudo touch /home/update-script 2. ...


2

Occidentalis, Raspbian and Debian divide the MySQL functionality into 2 packages: mysql-server and mysql-client. They can be installed using apt-get install, which should be run as root.


2

Firstly regarding your concern about "Shared hosting not being all that reliable". I'm not sure what country your from, but who is to say that your internet connection to your Raspberry Pi is all that reliable. Shared hosting is pretty reliable, probably more than your internet connection. Secondly it depends on what exactly you want control over. Storing ...


2

Following Gerben's comment on the question, one way to make that would be implementing a Message Broker and have a client poll for messages from a server with a known and static address (or a DNS entry that follows a dynamic address). I suggest taking a look at RabbitMQ. There is also a tutorial on how to install it in the Pi. Consider that the server will ...


2

First run this command (you may have already done this but lets be sure): sudo apt-get install php5-mysql then restart Apache (which I think is the actual cause of your problem), by doing: sudo /etc/init.d/apache2 restart.


2

how can I fix that without "system shutdown" You cannot. is there any... No, there isn't. No operating system in the world is designed to absorb having the cord pulled without a shutdown. If you keep doing this, you will find db corruption is only one of a wide range of possible problems. The purpose of software like MySQL is to provide high ...


2

Sound like MySQL is running out of memory. Have you checked the kernel log to see if the process is being terminated there? /var/log/kern.log You may need to tweak the setting in the my.cnf file: /etc/mysql/my.cnf


2

Yes, this should be possible. For that purpose I would write a simple shell script which consists of 2 parts: Create a backup of the database Upload that database dump to %cloudStorage Then I would set up a daily cronjob that executes that script. You can try to search for something like mysqldump for part 1, and bash upload dropbox for part 2. Check ...


2

Should I just go ahead and try Firebird? You don't just need a .deb, you need a .deb compiled specifically for the pi's CPU architecture (ARMv6 for A/B/+, and ARMv6 or ARMv7 for the 2). Those don't look to be available; Firebird claims to be open source so you could try compiling it (if you can find the source), but I don't recommend that path. I'm not ...


2

It appears that the repository in question only supports i386 and amd64.


2

PL/SQL is a proprietary language owned by Oracle Corp. This is why you only see support for it in commercial RDBMS's such as Oracle itself and IBM DB2. The latter presumably pay giant licensing fees for the privilege. Any of the above could release an ARMv7 version that might work on the Pi 2, but it seems they have not. So you are out of luck.


2

Good Afternoon. English is not my native language so please be patient. I think your problem is with dpkg and not with MySql. Try this: sudo apt-get -f install And then: sudo apt-get autoclean && sudo apt-get autoremove For last the classic: sudo apt-get update && sudo apt-get upgrade That will fix dpkg. If -f install doesn't work try ...


2

You don't specify what version of Raspbian you are running, however, Raspbian Jessie shows PHP 5.6.14 available via apt-get. I used the following command to determine this: sudo apt-cache policy php5 It can be installed with the following command sudo apt-get -y install php5 libapache2-mod-php5 To make Apache recognize the updated version you will need ...


2

Why not get it from the repositories? I would always do that when possible rather than downloading from a third party site. sudo apt-get install python-mysqldb To find mysql packages related to Python try apt-cache search mysql|grep python


2

Try logging in like this mysql -u root -p You are telling it to log as the user root with a password you will provide. It will prompt you for your password and allow you to access mysql. That is how I access it as root and have no problem with making changes. You can try granting all privileges on the database after creating it: GRANT ALL PRIVILEGES ON ...


2

I suggest you always use packages from the official Raspbian repositories when possible. They will have been tested and will be compatible with the other installed libraries. apt-cache search mysql | grep connect shows a number of results. For Python 2 use. sudo apt-get install python-mysql.connector For Python 3 use. sudo apt-get install python3-mysql....


2

I solved this problem replace php5-mysql by the php version installed. The php version is show with: $sudo php --version PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies ...


Only top voted, non community-wiki answers of a minimum length are eligible