SOCI MySQL problems on OS X - mysql

My project is trying to incorporate SOCI for easy MySQL database access from C++. One of my teammates created a running SOCI test program in linux using the MySQL backend with only this link in his CMake file:
target_link_libraries(MyExecutable ${SOCI_LIBRARY})
Under Mac, however, when I try to run the program it errors out on the session creation line:
session sql("mysql", "service...")
with this error:
Error: Failed to find shared library for backend mysql
I definitely have MySQL installed and I definitely built SOCI with MySQL support, the make for SOCI even says it found MySQL libraries.
Should a CMake project using SOCI with a MySQL backend also link against MySQL or the SOCI MySQL plugin? I have tried going down that route but end up getting different runtime errors, like:
dyld: Library not loaded: libmysqlclient.18.dylib
Referenced from: MyExecutable
Reason: image not found
Any help would be greatly appreciated, I can provide our test program if needed, thanks!

Related

loading the mysql module

I am 85 and trying to keep my brain active by converting a php/mysql page, that i wrote to node.js.
require 'mysql';
I have the nodejs server up and running. it delivers, correctly, an html page i wrote. i 'require fs' and get it but i cannot find a mysql module. when i npm mysql it fails with a warning of deprecation. my question is how can i get 'mysql' installed so that i can 'require' it? is there a 'mysql' module that i can downlod and place in the c:/nodejs/node_modules folder? Naive?
I have been learning node.js for months. Hopefully I can help:
Check your "package.json" in the code editor (VS Code/Atom).
Check whether "mysql" version in "dependencies" or not.
If no, go to terminal, type "npm install mysql".
After completion, it should have included in "dependencies".
Require mysql in your mysql database connection file (Example: const mysql = require("mysql");)
I think it should be working fine already.
You can always remove existing mysql by typing npm remove mysql in the terminal then go back to Step 3 to reinstall it.
Hope it helps. Thanks

ERROR :Could not load the script in /usr/local/lib64/kamailio//kamctl/kamdbctl.mysql for database engine MYSQL

I am getting this error when trying to create the database on kamailio.
I've used the following command : sudo /usr/local/sbin/kamdbctl create.
I've set the DBENGINE=MYSQL in kamctlrc file and saved as well. Still getting this error. Anyone please suggest me how to proceed. I've tried all possible ways but couldn't find the solution anywhere online.
ERROR :Could not load the script in /usr/local/lib64/kamailio//kamctl/kamdbctl.mysql for database engine MYSQL
ERROR: database engine not loaded - tried 'MYSQL'
The file kamdbctl.mysql is installed when you install db_mysql module. Be sure that module is installed. Next is a sequence to get the module installed:
make include_modules="db_mysql" cfg
make all
make install

Error on CodeBocks c++ to connect to MySQL using SQLAPI++

I am good at Code Blocks c++ 11, Python 3 and MySQL, recently I was trying to use SQLAPI++ to connect to MySQL.
I copied the codes from the official website http://www.sqlapi.com/Examples/step1.cpp and changed the database name, user name and password as required. The code compiles successfully but run into
the following error "Process returned -1-73741819(0xC0000005)".
I am running CodeBlocks 17.12 and MySQL 8.0 on Windows 10,
I searched for answers to the problem, in the link Unable to connect to MYSQL using SQLAPI++, the author Siddhant said, he used CodeBlock 10.0.5 and MySQL 5.5 to have fixed the error.
Do I have to go back to CodeBlock 10.0.5 and MySQL 5.5? Currently the database is working well with Python 3.
Thank you in advance for your help.
Solution: Re-compile CodeBlocks by 64-bits compiler, purchase the source code of SQLAPI++ and compile it by 64-bits compiler, then, Codeblocks c++ works well with SQLAPI++.

having issues getting php to talk to mysql set up on a mac -

My friend has a mac - we got AMPPS set up so he can run Apache, PHP and MySQL.
We got it up running. I can talk to mysql using phpMyAdmin.
I am running codeigniter - its working fine - but I'm getting an error when it tries connect to the database
Fatal error: Call to undefined function mysqli_init() in
mysqli_driver.php on line 126
I have a feeling that I'm missing the mysql.so extension or module in the Apache install or the PHP install.
How do I install that on a mac, or which config file do I need to modify?
That error indicates that the mysqli.so module is not loaded. Check the results of phpinfo() to see where the configuration file is, and make sure the module's being included properly. Often times there is a separate ini file for each module that's separately installed.
Personally I'd stay away from mysqli and use something higher level like PDO. I'd also recommend installing something maintainable like MacPorts or Homebrew to run Apache/MySQL/PHP instead of a pre-packaged solution.

Symfony2 Doctrine2 MS SQL Server connection on WHM/CPanel

SEE UPDATE BELOW:
I'm using Symfony2/Doctrine2 on CPanel and I need to make a connection to a MS SQL Server database. I keep getting an error saying
could not find driver
I've tried to install FreeTDS on WHM/CPanel following these instructions:
http://forums.cpanel.net/f5/definitive-freetds-installation-instuctions-88561.html
I also added an additional option to the PHP compilation (all_php5) so it looks like this:
--with-mssql=/usr/local/freetds --with-pdo-dblib=/usr/local/freetds
I then also added an entry to my php.ini file (/usr/local/lib/php.ini) that says:
extension= "mssql.so"
I rebuilt Apache/PHP after making all these changes but I still get the error saying the driver cannot be found. Anybody have this setup and know what I'm missing?
UPDATE:
So, instead of compiling FreeTDS, I found some packages through yum which I installed. I did, however, compile .so files for both mssql.so and pdo_dblib.so. They are now both referenced in my php.ini that I know is getting loaded. I can successfully use the mssql_* functions but PDO is still not working for me. I still get the the "could not find driver" error. I no longer have an all_php5 file since I don't think I need it anymore since I just compiled the .so files. Is this correct? What else can I do to get PDO working? Here is a screenshot of my phpinfo() page: