MySQL Connector/c (libmysqlclient) missing header file my_config.h file - mysql

I am trying to build a MySQL client only in C using Code Composer Studio to run on a micro without an RTOS. Its only function is to push a fixed format record to the server with no other features. I have downloaded the Connector/c source files and added all the "include" files to my build. I am getting 1 build error indicating that the #include "my_config.h" file can't be found. The reason is that it doesn't exist in the distribution from MySQL.com. The documentation seems to indicate that it is part of the server package but I downloaded that also and it is not included. The comments indicate this file defines the platform specific characteristics but gives no clue as to what they might be. Where can I get this file and what information should it contain??

Related

Translate MySQL error messages to new language

I want to translate MySQL's error messages. I tried:
Added new language to sql/share/errmsg-utf8.txt's top line.
(image)
Translated some error messages.
(image)
But there is no comp_err or sql/share/cmake_install.cmake in mysql folder and in shell.
I'm using xampp v3.3.0. Also tried MySQL 8.0.
Never edit directly the file installed.
Instead, modify the source code and build the error messages file again.
What you should do:
Create a git branch based on MySQL source tree (https://github.com/mysql/mysql-server), for the proper release (say 8.0)
Do a full build (this will create the comp_err utility too)
Read instructions in file share/errmsg_readme.txt
Edit file share/messages_to_clients.txt with the new translation
Commit the changes in git
Do a build again
This will create the file containing error messages with the new translation, which can be installed.

Warning: Could not find file C:\Users\Harsh Jain\Downloads\com.mysql.jdbc_5.1.5.jar\co

I am getting this error while running the Student Management System project in netbeans Ide project in made in java,jsp,html.Please help me
Your project's build has a dependency on the Java ARchive (.jar file) com.mysql.jdbc_5.1.5
There are two possibilities that I see here, without further details on what you have done so far:
1) You already downloaded the jar, but when you specified the path where your build process is gonna look for that file you had an error in your path ... make sure you have a jar file in C:\Users\Harsh Jain\Downloads\com.mysql.jdbc_5.1.5.jar or C:\Users\Harsh Jain\Downloads\com.mysql.jdbc_5.1.5.jar\com.mysql.jdbc_5.1.5.jar (I'm thinking you might have copied the name of the jar file twice in your path).
2) If you have not manually downloaded that file, then you should do so. You can find that version at http://www.java2s.com/Code/Jar/c/Downloadcommysqljdbc515jar.htm (or elsewhere). Once downloaded, make sure to copy/unzip the actual JAR file to your C:\Users\Harsh Jain\Downloads folder.
Once you have ensured the file is actually on your system AND in the right path, run the build again.

Qt Dynamically load MySQL driver

I have no experience with deploying apps. I started manually (by copying release.exe to target PC and 1-by-1 resolving it's DLL dependencies). I've ran into "Driver not loaded Driver not loaded" wall and I'm stuck now.
I tried starting anew with the help of windeployqt, it compiled a nice set of files and directories, and still that same error.
I tried checking arch of dlls with notepad hack and tried redownloading libmysql.dll from different places. I have rebuilt qsqlmysql.dll manually (only to learn I really needed libmysql.dll). I added project folder to PATH variable, still to no avail.
I've heard that Dependecy Walker might help, but it didn't, it only warned me that there were errors finding some files, to quote,
Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
So I'm begging for a method to learn where to put the DLL. Or just for a path, regarding that the app, dlls and everithing is 32-bit.
P.S. I've just learned that if I try to statically link that .lib file (which is by the way 30KB in size compared to .dll's 4MB) the build is successful but it changes nothing. DLL still needed
Download the 32bit connector for MySQL from here, then make a dynamic link to the lib, (Project -> Add Library -> External -> Dynamic), tick the platfrom you are working on; something like:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../mysql/mysql-connector-c-6.1.11-win32/lib/ -llibmysql
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../mysql/mysql-connector-c-6.1.11-win32/lib/ -llibmysqld
INCLUDEPATH += $$PWD/../../../../../mysql/mysql-connector-c-6.1.11-win32/include
DEPENDPATH += $$PWD/../../../../../mysql/mysql-connector-c-6.1.11-win32/include

Fatal Error when accessing /index.php/Special:Specialpages MediaWiki page

I recently upgraded our MediaWiki installation to version 1.24.2
Now when I access the Special pages at http://www.myserver.com/index.php/Special:Specialpages I get this error:
Warning: require(/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php) [function.require]: failed to open stream: No such file or directory in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Fatal error: require() [function.require]: Failed opening required '/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php' (include_path='.:/usr/local/share/pear') in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Can someone please point me at the right direction to solve this problem?
I have already searched the entire interweb for an answer...
PHP version: 5.3.10
MySQL version: 5.5.31
Apache version: 2.2.22
It seems there was an error while upgrading/transferring the files to your server.
It seems you solved your problem by yourself, however: You shouldn't update mediawiki's files on top of another version. Instead, you should delete the old installation (keeping the files you need like LocalSettings.php, images/ and so on) and upload a new copy of the new version you want to use. See https://www.mediawiki.org/wiki/Manual:Upgrading for a detailed upgrading tutorial. Following these steps should avoid such problems the next time :)
I found out what the problem was.
I installed v 1.24.2 on top of version 1.21
By some reason the file SpecialAllPages.php was named SpecialAllpages.php with a small 'p'.
After renaming the file to SpecialAllPages.php the same error was triggered regarding the file SpecialAllMessages.php that was named SpecialAllmessages.php
After renaming that file also, everything works fine again.

Trying to get RmySQL to work but not understanding bash's export or filesystem conventions

I am trying to install RMySQL on my mac (mavericks) and it errors out when I try to build it from source, saying:
Configuration error: could not find the MySQL installation include
and/or library directories. Manually specify the location of the
MySQL libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
Define and export the 2 shell variables PKG_CPPFLAGS and PKG_LIBS to include the directory for header files (*.h) and
libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I"
export PKG_LIBS="-L -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_.tar.gz
I tried to follow the instructions by entering:
export PKG_CPPFLAGS="-I/usr/local/mysql/include" export
PKG_LIBS="-L/usr/local/mysql/lib -lmysqlclient"
but when I re-run RMySQL it still doesn't work. Moreover, if I type
$PKG_LIBS
to see what that variable holds, I get
-bash: -L/usr/local/mysql/lib: No such file or directory'
I know that /usr/local/mysql/lib exists and it does contain a mySQL header. Am I misunderstanding the instructions?
I'm asking here only after a lot of effort to find solutions and/or work arounds. Sucks being a noob sometimes.
I am going to assume you're trying to get RmySQL to run on R 3.1.0 on Mavericks? Rather than worry about exporting variables etc, here is a simple clean solution for you that should avoid the headaches.
The RMySQL install link Pascal provided above really is your solution. You're probably just stumbling on syntax, or getting things to work from the terminal.
Even if you're a "noob", you should be able to get this working. I'll try to offer a "dummy's guide" walk through here, as I bet there are many others who have this problem too, even after trying to read the RMySQL installation readme.
I would bet with very high confidence the problem is just that you aren't specifying correctly the locations of the library and header folders for compiling. Read the errors carefully when you try to compile... the errors will probably tell you a file/header is missing, or some .so file (shared object) is missing.
One simple way compile RMySQL from source on R 3.1.0, mavericks is as follows (this does not require you to set any environmental variables, no editing of the Renviron file, etc):
Does MySQL work by itself? i.e. Can you open/run it no problems? If not, fix that first.
Find the precise location of your mysql installation. For me, on Mavericks, I see mysql installed at /usr/local/mysql-5.6.17-osx10.7-x86_64 (your version number may be different). There is also another folder /usr/local/mysql which is an alias to /usr/local/mysql-5.6.17-osx10.7-x86_64 (/usr/local/mysql finds the current version of mysql you are using, if multiple mysql file folders exist, I think). In this directory, I see two sub directories (among many) called "include" and "lib". Take a look; "include" will contain header files (include as in #include , etc, in simple C++ programs). The "lib" folder contains compiled source code of the mysql library.
An easy way to compile and install RMySQL which doesn't exactly follow the suggested way to do it in the installation guide is this. Note that this is doing the same thing as in the installation guide, just a little easier as it's one command line from the terminal, once you know where your mysql install folder is. Go to the terminal, and type the following exactly, with one space between each chunk (with your mysql folder name adjusted appropriately for the version number):
PKG_CPPFLAGS="-I/usr/local/mysql/include/" PKG_LIBS="-L/usr/local/mysql/lib/ -lmysqlclient" R CMD INSTALL RMySQL_0.9-3.tar.gz
OR (the same thing, just more typing)
PKG_CPPFLAGS="-I/usr/local/mysql-5.6.17-osx10.7-x86_64/include/" PKG_LIBS="-L/usr/local/mysql-5.6.17-osx10.7-x86_64/lib/ -lmysqlclient" R CMD INSTALL RMySQL_0.9-3.tar.gz
Note for dummies: Make sure when you run this command, that you are doing it from the terminal in the directory that contains the RMySQL_0.9-3.tar.gz file (or whatever the name of your folder is that contains the RMySQL source code)
and RMySQL compiles!
Don't be afraid about trying to compile source code -- it's not just for 'compiled language programmers' or 'computer science graduates'. Most of the time when compiling fails it's just because files are "missing" (there is no corruption on the source code) -- the user hasn't properly specified the locations of the header and libraries (shared objects). Now pull your big boy/girl panties up and just do it .... it's easy.
Notes for people clueless about compiling source code for packages in R:
a) pay special attention to the spacing in the above, otherwise it may not work. Do not have any spaces between the = and the variable/file names (e.g. don't try and have in the above PKG_CPPFLAGS ="-I/usr/local/mysql/include/" as it won't work)
b) When compiling, you want to specify the locations of the header files and the library files and this is what the "-I/ .... " and "-L/ ...." are doing. The -I directory specifies the location of the header files, and the -L the location of the library files. The library files also require the -l[name of library] extension (the -l is short for -lib in the library object names).
c) Note that in the directory /usr/local/mysql-5.6.17-osx10.7-x86_64/lib/ I do not see a file called "lmysqlclient", or even "libmysqlclient", but I do see files named (among others) "libmysqlclient.a" and "libmysqlclient.18.dylib". So don't worry about your MySQL installation not being correct if you don't see a file just called "libmysqlclient" in the lib folder.