sql.h not found in Linux - mysql

I'm trying to migrate a PostgreSQL db to MySQL using Workbench and I need the PostgreSQL drivers to make the connection.
I'm following this post for installing the drivers and I'm having some issues while runing the make command:
./psqlodbc.h:41:10: fatal error: 'sql.h' file not found
I've read here that I need to install unixodbc-dev but then I have to uninstall libiodbc2-dev which then make reports missing iodbcinst.h file!
Is there a package where both headers are present? How can I install sql.h manually in the system?
BTW: I'm using Linux Mint.

Related

Object reference not set to an instance of an object on mySQL Installer while configuring mySQL Server 8.0.25

I recently deleted mySQL and now when i am trying to reinstall it is giving me an error while configuring the mySQL Server
i have tried deleting everything from program file and registry also still no success
enter image description here
I found the issue.
When you install with the Installer 1.4, it won't work.
You should be good if you use V.1.6 of the installer.
https://dev.mysql.com/downloads/installer/

How to fix a broken MySQL installation?

Installing a PHP application that requires MySQL or MariaDB, I first installed MariaDB via 'apt install' from the MariaDB repos, but there were behaviours with the installation of the application that seemed to be caused by some kind of incompatibility. Calls to the DB were timing out, and although I could see it was creating the DB, it was impossible to set the application up in its setup routine.
So I used apt remove to get rid of MariaDB. I saw the application had a *.deb installer for all requirements (wish I'd seen this sooner!) and, after removing PHP and Nginx, I attempted to install it the normal way. Unfortunately, the MySQL portion of the installation failed with:
Automatic maintenance of MySQL Server daemon disabled.
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL Installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN
Unfortunately, /etc/mysql/FROZEN is a symlink to a non-existent file explaining downgrading. I can't run the uninstaller of the overall package or repair the installation with sudo --fix-broken install because the installer requires a MySQL password I can't provide it.
How can I fix my borked MySQL installation? If I could just get to a place to have MySQL run properly, understanding what left-overs perhaps from the MariaDB installation that I need to delete manually before trying to repair it, that would be helpful. FYI, the version of MariaDB was 10.3, and the version of MySQL the application package was installing was 5.7.
Any suggestions appreciated.

Connect to node.js after installing MySQL

When I type var mysql=require('mysql');, I get an error that mysql module is not found.
In which folder of node.js should MySQL be placed? Should the entire MySQL folder be placed?
I'm not quite sure what mysql folder you are talking about but I would recommend just using npm for this and letting it handle the installation of the package.
Simply go into the folder of your project and install the MySQL Module using npm install mysql.
You can read more about using and installing the MySQL Module here.

MySQL: Missing X Plugin

MySQL Version is 5.7.15. Ubuntu 16.04.1
I am trying to set up MySQL as a document store, as described in section 3.3 of the MySQL 5.7 Reference Manual
When I run the command:
mysqlsh -u user -h localhost --classic --dba enableXProtocol
I get:
Creating a Classic Session to root#localhost:3306
Enter password:
No default schema selected.
enableXProtocol: Installing plugin mysqlx...
enableXProtocol: Error installing the X Plugin: Can't open shared library '/usr/lib/mysql/plugin/mysqlx.so' (errno: 2 /usr/lib/mysql/plugin/mysqlx.so: cannot open shared object file: No such file or directory)
When I try:
mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
I get:
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/mysqlx.so' (errno: 2 /usr/lib/mysql/plugin/mysqlx.so: cannot open shared object file: No such file or directory)
The manual says this plugin should be built in, but I can't find it when I run SHOW PLUGINS().
I've searched Google and Stack Overflow, and found nothing regarding my issue.
Any assistance is appreciated.
MySQL originally installed using tasksel as part of the LAMP stack.
Issue resolved by uninstalling and reinstalling MySQL through APT repository.
I installed mysql by apt directly, and then has the same problem.
By chance I solved it by download and upgrade MySQL APT repository and then uninstalling and reinstalling MySQL.
In new repository, you can find it installs more applications:
mysql-community-client
mysql-community-server
..
So, i guess it just is community functions.
I faced the same question, because I want to use X dev api to connect Mysql. there is no mysqlx.so in the directory. I think it may be a bug.
Uninstall all things about mysql-server, and then follow the tutorial here, you`ll get it. In mysql 8.0, by default, mysqlx is ON.

MySQL Workbench on Mac - Operation Failed for Server Adminstration

I am using "Configure Local Management" in MySQL Workbench for Mac for a MAMP server, and while my connection works, for some reason, I am getting the following error
It says Operation failed: /usr/local/mysql/support-files/mysql.server start is invalid
While the mysql there does not exist, however, when I type in mysql --version in Terminal, it says I have 5.6.13 installed.
What could possible be the issue here?
I'd say the MAMP installation doesn't use the standard way of installing a MySQL server. Better use the package from the MySQL homepage instead. It will also install the standard scripts for controlling the server. In your case find out where the MAMP installer writes the mysql.server script and use this path instead in the setup of your connection.
Btw: you can ignore this error if you never want to start/stop your server from within MySQL Workbench. The command is not mandatory.