FireDac error 314 - but DLLs are in program directory - mysql

I am getting when trying to access a MySql database :
[FireDac][Phys][MySQL]-314. Cannot load vendor library [libmysql.dll
or libmysqlld.dll]
This did not previously happen with this (unchanged) code, however, I have upgraded to Windows 10 and had to reinstall Delphi XE8, so it is obviously a system configuration matter.
In order to try to solve the problem, I copied both of those files into c:\windows\sysytem32.
When that did not seem to work, I copied them into \win32\debug, which is where the generated .EXE resides.
I imagine that I am doing something rather stupid, but can't see what.

The proper solution is to place the driver file (eg., libmysql.dll) in your application's folder, or to place the installation location in your FDDrivers.ini file:
[MySQL]
Vendor=<folder>\libmysql.dll
(Recent versions of the documentation seem to use VendorLib instead of Vendor in the INI file.)
See the RAD Studio documentation topics Configuring Drivers (FireDAC) and Connect to MySQL Server (FireDAC) for more information.

Let me to answer in two point.
Developing, live database connection!
Hope you have on your data module an "TFDPhysMySQLDriverLink" component.
Click this component and browse your LibMySQL.DLL into VendorLib. Should be work. But only in design time.
Runtime. Hopefully your DM created firstly in your project.
In the DM's OnCreate event, you have to disconnect your library (I always ran my project with no database connection) and replace your "TFDPhysMySQLDriverLink"'s Vendorlib to LibMySQL.DLL (which is copied your which is copied where the generated .EXE resided)
Have a nice day!

Related

How do I modify the defaul graphdb.home directory?

I have installed GraphDB Free v9.3 in LinuxMint 19.3.
The workbench is running fine though I haven't created any repositories yet. This is because I have noticed that although the application is installed at /opt/graphdb-free, the data, conf and log files are in a hidden folder below my home folder: /home/ianpiper/.graphdb/conf (etc).
I would prefer to store these folders on a separate volume, mounted at /mnt/bigdata. In the documentation it suggests that I can set graphdb.home using the graphdb.properties file (though I don't seem to have such a file in my installation) or in the startup script. I think this script might be /opt/graphdb-free/app/bin/setvars.in.sh, and that I could use this to change
-Dgraphdb.home=""
to
-Dgraphdb.home="/mnt/bigdata"
Could a knowledgeable person advise as to whether my understanding is correct, and if so what the best way is to change the location of graphdb.home?
Thanks,
Ian.

IntelliJ IDEA: Unable to download MySqlDriver

I am using IntelliJ IDEA,and I want to configure MySQL database from the IDE:
then fail:
The error is:
Failed to download 'http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.40-bin.jar
I don't know why connection will time out.
I can download other things such as plugins from jetbrains, but except jdbc-drivers.
I recommend taking a look in IDEA's log files to see if they may have additional details as to why the download is timing out. From the menu go to Help > Show log.
As a workaround, you can manually download the drivers and place them in the necessary location. Download bo the JAR and the mysql-connector-license.txt license file (from http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-license.txt of from MySQL directly). Place both files in the path {idea-config-dir}/jdbc-drivers/MySQL Connector/J/5.1.40 (modifying the version number if necessary). The location of the {idea-config-dir} can be looked up in the Directories used by the IDE to store settings, caches, plugins and logs help document. For example, c:\Users\Dilbert\.IntelliJIdea2017\config or ~/Library/Preferences/IntelliJIdea2017
Thus, in the end, that directory should have two files:
mysql-connector-java-5.1.40-bin.jar
mysql-connector-license.txt
put jars in
C:\Users\UUSER\AppData\Roaming\JetBrains\DataGrip2020.1\jdbc-drivers\PostgreSQL\42.2.5
from another install with internet
In 2019, The folder is this >>
C:\Users{YourUser}.DataGrip2019.3\config\jdbc-drivers\MySQL Connector\J 8\8.0.21
Download jar from
https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar

Can't execute setup.py (Error 5 - Access Denied)

I ran into a problem creating a new project in Cocos2d-x 3.1.1 (or 3.0 - it happens at both versions).
When I'm running the build script in console (Windows 8 - console with admin privileges) an WindowsError pops up (check the image below).
http://i.imgur.com/Ixg4jEE.png
I can set up the COCOS_CONSOLE_ROOT manually, but it does not help with the Error 5.
I tried setting the 777 priviligies an all cocos2d-x folder and subfolders, but it does not help.
Anybody had the same problem? Any solutions out there?
On Windows you should not put manually installed programs and tools under C:\Program... (english: C:\Program Files) because that's a folder where only apps with a proper installer should go. Otherwise you will keep having permission issues. Apps are not allowed to write to that folder or any of its subfolders.
Since cocos2d-x isn't an app, it can't redirect its output to the proper AppplicationData folder as is mandated by the operating system. Not being able to write or modify the program folder's contents (except during installation) is a security feature in Windows that you can't (or shouldn't) bypass.
To fix this simply extract cocos2d-x in a folder that both you and apps have full read/write permission. Normally this would be in your Documents folder, but Desktop would also work and probably just any folder on a drive that you created, for instance C:\cocos2d-x.
Due to this line:
_winreg.SetValueEx() ...
the actual problem looks like to be with registry access, rather than with file permissions.
Make sure you actually running console as an admin, by:
searching cmd in Windows search, or just creating a shortcut to it to desktop
right clicking to cmd.exe and choosing "Run as administrator"
Make sure you don't have registry access block in any way: like blocking in group policies, some "security optimization" software and viruses and antiviruses.
Make sure your python version is 2.x. Python 3.x is not supported.
Anyway, this 'setup.py' step is optional for using cocos2d-x and you can live without running it at all.

How to install ioncube Loader on openshift

I'm having a problem activating ioncube on openshift.
The loader-wizard tells me to do the following steps:
1) Download one of the following archives of Loaders for Linux x86-64: zip tar.gz tar.bz2 etc.
2)Transfer the Loaders to your web server and install in /usr/lib64/php/modules
3) Put this: "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so " in your ini files directory, /etc/php.d
4)Restart the Apache server software. When the server software has restarted, click here to test the Loader. If the Loader installation failed, check the Apache error log file for errors and see our guide to Unix related errors.
But I can't transfer the loader in /usr/lib64/php/modules, because I don't have permissions.
I tried to put the loader somewhere else and edit the new php ini located at ~/php/versions/shared/configuration/etc/php.ini I added there the the path to the loader, restarted the app, but still does not work.
I also posted this question on openshift.com forums, but didn't get any answers at the moment.
Any suggestions will be very appreciated.
Thank you.
Success in Loader installation will ultimately depend on the server and PHP configuration.
ionCube have recently released a Windows based installer that can automatically deploy the required Loader locally or to a remote server over FTP or SFTP, and also make configuration file changes. I suggest trying that. The download is at http://ioncu.be/LI
(disclosure: I am associated with ionCube)

how to connect mysql databases in weka?

i want to use my mysql databases in weka in order to analysis data.
i download the mysql-connector-java-5.0.8-bin.jar and put that in weka folder in my program Files folder, and add this path to system variable path, but when i open the weka explorer and click the openDB, i don't know what should i write in the url textbox,
i don't know completely what should i do?
the error that i saw is:
problem connecting to database:
no suitable driver found for!
please give me a total guidance, thanks in advance.
add mysql-connector-java-5.1.12-bin.jar to CLASSPATH .
or put it in weka folder, navigate to weka installation folder and run command :
%java_home%/bin/java -Xmx300M -cp ".;weka.jar;mysql-connector-java-5.1.12-bin.jar;" weka.gui.GUIChooser
then click open DB and
fill in the proper user+password
put the url: jdbc:mysql://localhost:3306/DATABASENAME
Click Execute. The result window should show the results now.
For Weka 3.7.10, the classpath system environment variable is not took into account (at leat under Windows 7). The only working approach for me was to modify the RunWeka.ini file from the Weka installation folder as follows: the cp= setting was modified to:
cp=%CLASSPATH%;d:/Programs/jdbc/mysql-connector-java-5.1.26/mysql-connector-java-5.1.26-bin.jar
whereas only the %CLASSPATH%; setting was originally provided. Does not make much sense, but in worked.
find some introduction to WEKA and the environment variable:
http://weka.wikispaces.com/CLASSPATH
Copy mysql-connector-java-X.X.XX-bin.jar to /usr/share/java/
unizip /usr/share/java/weka.jar
edit: /usr/share/java/weka/experiment/DatabaseUtils.props
add:
jdbcDriver=com.mysql.jdbc.Driver
jdbcURL=jdbc:mysql://localhost:3306/test (with your server)
add shell
export CLASSPATH=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar:
export CP=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar::/usr/share/java/:/usr/shared/java/weka.jar
execute weka:
java -cp $CP -Xmx500m weka.gui.explorer.Explorer
Ready