Our shop just upgraded to Matlab 2019a, and I'm bumbling around the import of MySQL/MariaDB data (*.frm files). I found myself to the sqlread tutorial. I have yet to fully plumb the machinations behind the database command to set up a connection, but in messing around, I seem to have discovered that I don't have an sqlread function. This is odd, as I have the Database Toolbox:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: ______
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Database Toolbox Version 9.1 (R2019a)
<...snip...>
>> help sqlread
--- sqlread not found. Showing help for stlread instead. ---
<...snip...>
>> which database
C:\Program Files\MATLAB\R2019a\toolbox\database\database\database.m
>> which sqlread
'sqlread' not found.
Why would this not be available?
TMW investigated and reported that sqlread becomes available after setting up a data source.
Unfortunately, the next road block that I'm confronting is setting up the data source.
My question about a simpler alternative to import MySQL data into Matlab still stands.
Thanks.
Related
Yesterday i downloaded GlassFish 5.0 and JDK9. When I'm trying to run server with asadmin start-domain GlassFish send to me exception
When I try to use "asadmin start-domainAfter" I got respond: "Remote server does not listen request on [localhost 4848]. Is the serwer up?"
Any can help me with this? I looked for solution at google, I tried kill process using port 4848, change port 4848 in domain.xml on another one, nothing helps.
It's my firts time with glassfish I don't know what to do. Anyone can help me?
I'm working at windows 7, InteliJ Ultimate 2017.2.4, JRE 1.8 and JDK 9.
GlassFish 5.0 not starting on JDK 9 is a known issue.
GlassFish 5.0 is certified only on JDK 8 (u144) as stated in the release notes:
https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf
I use Windows 10 and I have installed JDK and JRE for version 9 and 8u141, 8u151, 8u144 (installed for test about this problem)
For exception I had had the same problem : the command "asadmin start-version" throw an exception.
Just check the version from CMD console :
C:\Users\xxxxx>**java -version**
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
Problem JAVA_HOME and PATH environment viariables are JDK8u151 ???
To solve the problem, the documentation advice that :
Alternatively, you can specifically set the Java path with the AS_JAVA property in the in the as-install/config/asenv.conf file.
C:\DEVENV\glassfish5\glassfish\config>dir
Le volume dans le lecteur C s’appelle OS
Le numéro de série du volume est 10BF-2BBE
Répertoire de C:\DEVENV\glassfish5\glassfish\config
08/09/2017 07:27 <DIR> .
08/09/2017 07:27 <DIR> ..
12/01/2018 17:44 3 516 asenv.bat
...
Consequently, I add the last line below :
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin
set AS_CONFIG=..\config
set AS_INSTALL=..
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DEF_NODES_PATH=..\nodes
set AS_DERBY_INSTALL=..\..\javadb
**set AS_JAVA=C:\Program Files\Java\jdk1.8.0_151**
Relaunch CMD console and start server with asadmin start-domain : it works properly....enjoy.
As mentioned above GlassFish 5.0 leverages new features in Java SE 8,
and is certified today on Java SE 8. Even though we have a lot of work
in front of us with the transition to the Eclipse Foundation, our
current intent is to certify Java SE 9 in an upcoming GlassFish 5
release.
JDK 9 should be supported in the next update, i.e. GlassFish 5.0.1
See end of https://blogs.oracle.com/theaquarium/java-ee-8-is-final-and-glassfish-50-is-released
If you are on a mac or linux machine, add the following to config/asenv.conf in your glassfish installation directory.
set AS_JAVA="path to your jdk 8"
For example, in Mac OS it will be
AS_JAVA="/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home"
Anyone having problems with NullPointerException, look out for your system PATH Variables. Be sure that they point to an acceptable JDK (As it was said before: GlassFish 5.0 is certified only to work on JDK 8u144). This NullPointerException is caused by using an incompartible JDK as mentioned here: https://docs.oracle.com/cd/E19226-01/820-7688/gipqi/index.html
In my case the PATH variable was correctly pointing to java8u144 bin, but my PATH also contained a pointer to C:\ProgramData\Oracle\Java\javapath. And someway an old version of java SDK was stored on \ProgramData\Oracle so GlassFish was using this old version of java as SDK.
I have a project with a connection that was working properly on the same device. I suddenly got the error below. And I could connect from the same device through MySQL workbench.
What could be the reason?
library(RMySQL)
con <- dbConnect(RMySQL::MySQL(),
host = "xxx",
dbname="yyy",
user = "zzz",
password = "############")
Error in .local(drv, ...) :
Failed to connect to database: Error: Lost connection to MySQL server at 'reading authorization packet', system error: 10060
And here's the session info
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RMySQL_0.10.10 DBI_0.4-1
loaded via a namespace (and not attached):
[1] tools_3.3.1
My code started having this exact problem after doing a system wide package update on 3/29/2017 for the first time since 2/1/2017.
Looking at the versioning for RMySQL,
RMySQL_0.10.9.tar.gz published 2016-05-08 15:39
RMySQL_0.10.10.tar.gz published 2017-03-21 07:50
I reverted my version to 0.10.9 and the problem went away:
require(devtools)
install_version("RMySQL", version = "0.10.9", repos = "http://cran.us.r-project.org")
I posted your issue to the RMySQL bug page, so we'll see if they address it
I checked another latest version of RMySQL package recently, RMySQL_0.10.11.zip
The problem exists in that too.
Apologies, cant comment as not allowed currently, hence wanted to update about the version where the problem is still being seen.
Additional Info
Connection to MySQL on my system is working from
1) Cmdline
2) MySQL Workbench
3) Tableau
4) Excel
It is just not working on R.
I checked following
link1
link2
link3
SHOW GLOBAL STATUS like 'Aborted%clients%';
And every time connection is dropped from R, the value of above variable goes +1.
Even doing
SET GLOBAL connect_timeout = 10;
has not helped.
UPDATE
Is there a dependency/requirement for PERL to be installed for usage of RMySQL?
As of now, my system does not have PERL. if this requirement is indeed true, then that might be 1 of the reason and may be the latest version has the problem fixed. Please let me know about the PERL dependency?
I was able to fix this issue on my PC using R 3.4 by following #Page's advice to look into the package versioning. However, not only did I need to install an earlier version of RMySQL (reverting from 0.10.11 to 0.10.9), I also needed to change versions on its dependancy package DBI (reverting from 0.6-1 to 0.5), using the following command:
require(devtools)
install_version("DBI", version = "0.5", repos = "http://cran.us.r-project.org")
install_version("RMySQL", version = "0.10.9", repos = "http://cran.us.r-project.org")
I am using Linux (Ubuntu 12.04) with 64-bit java 7 and Eclipse (Indigo).
On the game project we are using slick2d and along with it lwjgl. I was halted by the following errors.
(fixes explained in the answer)
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
java.lang.UnsatisfiedLinkError: no jinput-linux64 in java.library.path
Failed to open device (/dev/input/event8): Failed to open device /dev/input/event8
Versions:
Slick2D
Mon, 01 Oct 2012 09:54:11 +0100
Sun May 11 20:17:03 BST 2008
build=264
LWJGL (could be 2.8.5 already, but now this):
2.8.4
To fix this, follow the instructions provided in the 'slick2d' documentation
http://www.slick2d.org/wiki/index.php/Main_Page
This seems to be a real bug with slick2D/lwjgl on the versions that we are currently using. To fix this you can't use 64-bit java (with linux at least). Download the 32-bit java from Oracle web site and configure this to be your IDEs runtime environment (you may need to search for more help how to do this in your particular IDE)
This is purely related to permissions on linux. Go to '/dev/input' and change the folder permission 'sudo chmod 644 *' so that the process can simply read what's in there.
There didn't seem to be info on how to fix this problem whole together. Hope this helps some one else.
Download slick and copy needed libs (jinput-linux64, lwjgl, .dll & .so files) to your java.library.path
to get the java.library.path you can do so: System.out.println(System.getProperty("java.library.path"));
The CUDA C Programming Guide Version 4.2 states:
The driver API is implemented in the nvcuda dynamic library which is copied on
the system during the installation of the device driver.
I installed the RC5.0 devdriver on my Linux box along with SDK 4.2 and 5.0. Right now I have difficulties finding this library. Its not in (or under) /usr, /lib, /lib64, nor in one of the SDK libs:
CUDA 4.2:
ls /usr/local/cuda-4.2/cuda/lib64/
libcublas.so libcudart.so libcufft.so libcuinj.so libcurand.so libcusparse.so libnpp.so
libcublas.so.4 libcudart.so.4 libcufft.so.4 libcuinj.so.4 libcurand.so.4 libcusparse.so.4 libnpp.so.4
libcublas.so.4.2.9 libcudart.so.4.2.9 libcufft.so.4.2.9 libcuinj.so.4.2.9 libcurand.so.4.2.9 libcusparse.so.4.2.9 libnpp.so.4.2.9
CUDA 5.0:
ls /usr/local/cuda-5.0/cuda/lib64/
libcublas.so libcudart.so libcufft.so libcuinj.so libcurand.so libcusparse.so libnpp.so libnvToolsExt.so
libcublas.so.5.0 libcudart.so.5.0 libcufft.so.5.0 libcuinj.so.5.0 libcurand.so.5.0 libcusparse.so.5.0 libnpp.so.5.0 libnvToolsExt.so.5.0
libcublas.so.5.0.7 libcudart.so.5.0.7 libcufft.so.5.0.7 libcuinj.so.5.0.7 libcurand.so.5.0.7 libcusparse.so.5.0.7 libnpp.so.5.0.7 libnvToolsExt.so.5.0.7
Where is this library installed to?
It's not that the driver API is not included in the RC 5.0. I just reinstalled devdriver 4.2 and its still not in the above mentioned places.
Found it. But under a different name (libcuda instead libnvcuda):
/usr/lib/libcuda.so.295.41
This must be a typo/error in the manual.
libcuda is always by default installed to /usr/lib/ and on 64bit linux /usr/lib64
See also Chapter 5. Listing of Installed Components for list and locations of other driver components.
I'm trying to connect to MySQL using MATLAB R2009b 64 bit and the mysql.cpp file found on the FEX and here. I followed all the steps to compile listed in the second link. After entering the following:
mex -I"C:\mysql\include" -DWIN32 mysql.cpp "C:\mysql\lib\opt\libmySQL.lib"
the mysql.mexw64 file is created in my working directory. However, when I go to test it, I get the following error:
>> mysql('status')
??? Invalid MEX-file 'C:\[path]\mysql.mexw64': C:\[path]\mysql.mexw64 is not a valid Win32 application.
I tried switching out the -DWIN32 with -DWIN64, but that just threw all sorts of errors. Anyone have a suggestion as to why this isn't working?
I'm using MATLAB R2009b 64 bit on Windows 7 64 bit.
libmysql.dll is a 32-bit library. Matlab 64-bit wants mex-files to be compiled in 64-bit mode. Unless you can recompile the library, you won't be able to get the mex-file to work, I'm afraid.