02-22-2019 04:48 AM - edited 02-22-2019 06:21 AM
Hi,
In order to evaluate cRIO-9057 performance, I'm migrating one of my RT applications from a cRIO-9036 to this new target. My application is using a local MySQL database. So I'm trying to install and configure a MySQL server on my target. My method is quite similar as the one explained in the attached pdf file, and approved on cRIO-9066, cRIO-9035 and cRIO-9036. Nevertheless, it seems that the MySQL server don't want to start correctly.
I attached a second file "ConsoleOutDuringInstallationViaWorkNetwork.txt" that is a copy/paste of the console out obtained during this installation.
Is somebody ever try to do it on a cRIO-905x ?
Is somebody can help me to understand what error messages means and what to do to fix this issue ?
Cdly,
02-22-2019 09:33 AM
Hi steuveu,
I would not expect this to be specific to the 905x. In fact, I received the same error on a 903x target. Have you tried using MySQL with 2018 SP1 (18.5) versioning before?
It appears that this is a bug in the Yocto/OE environment that NI uses to build NI Linux Real-Time. You can reference https://jira.mariadb.org/browse/MDEV-14044 to see the bug report and possible workarounds in the comments.
FYI NI Linux RT is currently based off of Pyro (Yocto Project Version 2.3) which has a release date of May 2017. This means that a fix to this bug report would not be a part of the 2018 SP1 version of NI Linux Real-Time.
Thanks,
Andy
02-25-2019 03:06 AM
Hi Andy,
First, thanks for all your informations and links.
Indeed, this is the first time I try to use MySQL with 2018. I have no other option with this new cRIO.
Steve
02-28-2019 08:21 AM
Hi andy
I am working with steuveu, I try to install MariaDB on a 904x cRIO, and we have the same problem with 2018 SP1
Our knowledge on Linux and compilling are limited do you have tutorial or details to be able to recompile MariaDB with the patch ?
Regards
09-12-2019 09:47 AM
Did anyone get this working? I have a project that will require a MySQL or MariaDB to be installed on a CRIO 9045.
Regards
01-28-2020 12:48 PM - edited 03-11-2020 06:34 AM
I can report the bug is still in the feeds for 18.5. I had to downgrade to 17.
#
!includedir /etc/my.cnf.d
admin@NI-cRIO-9030-01C90598:/# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
admin@NI-cRIO-9030-01C90598:/# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.50-MariaDB Source distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
admin@NI-cRIO-9030-01C90598:/#
Edit on 3/11/20:
I just recently purchased 2 cRIO-9053s for a project. These units require LabVIEW 2018 and the feeds still seem to point to the broken MariaDB. Got the same ole "we don't support MSQL" from NI when I called about getting the feeds updated to address the fix implemented by MariaDB in 2017. Has anyone been successful at compiling MariaDB on the cRIO under 18 or 18.5?
06-26-2020 12:49 PM
I can report back that the feeds for NI-RIO 20 have fixed the broken MariaDB package. It installs and functions as expected.
01-22-2021 03:10 AM
Hi Doug,
I'm actually trying to install MySQL on a cRIO-9031 with Linux RT System Image 20.5. mysq5 installation looks good. (no error reported) but I have "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'" when I try to connect. (mysql -u root -p)
Service looks running.
Could you give me more informations about what you did please ?
Thanks in advance,
steuveu
01-22-2021 06:38 AM
After my installation, I don't use
#mysql -u root -p
I use just
#mysql
However, I am not sure that would cause the issue you are experiencing.
However I see some post with the same error code you are seeing:
Here are the notes I made when setting it up with 17 feeds and then again with 20 feeds:
Before we start, if you have not updated opkg in a while, you should probably do that first:
#opkg update
After update the package list from the NI repository http://download.ni.com/ni-linux-rt/feeds/2017, we can install MySQL. There is already an opkg package in the list so, run the following comand:
#opkg install mysql5
This process will take a while beginning with downloading several packages and supporting libraries.
Once the installation is complete, to start the MySQL server, you should type:
#/etc/init.d/mysqld start
Theoretically, the installation already starts the MySQL service but this is a way to ensure that is running.
If the installation is successful, we will see the message Starting MySQL SUCCESS! and we can log into the MySQL local server just typing:
#mysql
MySQL - Remote Connections
Once connected you need to edit the MySQL server configuration file my.cnf using a text editor such as vi:
#vi /etc/my.cnf
Once file opened, locate line that read as follows:
[mysqld]
And make sure line skip-networking is commented including a hashtag at the beginning (or remove the line):
# skip-networking
and add following line
bind-address=<cRIO IP Address>
For example, if your MySQL server IP is 10.0.0.5 then entire block should be look like as follows:
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = home/lvuser/mysql.tmp
language = /usr/share/mysql/English
bind-address = 10.0.0.5
# skip-networking
Where,
Save and Close the file, and restart the mysql server:
# /etc/init.d/mysqld restart
02-04-2021 01:17 AM
Hi,
I need to manually start mysql, #/etc/init.d/mysqld start
i think i have a user config problem
i have a mysql user existing on my system:
mysql:x:399:399::/var/mysql:/bin/false
is there something else to do ?