MySQL: Missing X Plugin - mysql

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.

Related

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.

Error installing mysql

Beginning configuration step: Initializing Database
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.11...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on...
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] Unknown suffix '.' used for variable 'lower_case_table_names' (value '0.0')
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-06-26T08:44:42.036600Z 0 [Note] [MY-010120] [Server] Binlog end
Process for mysqld, with ID 3232, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.11.
Database initialization failed.
Ended configuration step: Initializing Database
I am having this error in log during the installing of MySQL on the application configuration part.
Resolved following these steps:
- Rollback installation until initial page and choose remove mysql server
- Uninstall from add/remove programs mysql community installer
- reboot
- install version mysql-installer-web-community-5.7.22.1 and select update when it asks.
- done
This is a Bug in the Installer of 8.0.11.
There are changes in the lower_case_table_names variable in the new release. See:
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html
Nobody can fix this. If you installing the Server the configfile is write before new. Every time. So if you fix this 0.0 to 0 in my.ini the changes will be overwritten.
Somebody have to report a this bug to MySql.
EDIT:
I have report a bug to oracle:
https://bugs.mysql.com/bug.php?id=91539
The only way to get rid of this error is by allowing MySQL Installer to update when it prompts to do so at the beginning of the installation. Please note that you will get this error if you didn't allow the installer to update.
Updating lower_case_table_names = 0 in my.ini doesn't fix this because MySql will re-initialize it to 0.0 everytime before running the scripts.
If you didn't allow updates, you will need to uninstall all components of MySql and run the installer again and let it update.
First you have to uninstall mysql:
Step 1. control panel->programs and then uninstall whole mysql.
Step 2. delete folder MySQL from the following path.
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL (your programdata folder is hidden so you have to unhide from c drive->views->options->view ->show hidden files)
4.C:\Users\hp(your pc name)\AppData\Roaming\MySQL
Step 3. windows+r write regedit.exe enter and follow the path and delete mysql Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\
Step 4. control panel->administrative tool->services then find mysql copy name then open cmd run as administrative write (sc Delete "mysql name that you copied")enter.
Now you can install MySQL
Update the installer for mysql-installer-web-community-5.7.22.1 file during the installation from the web . I encountered the same problem, after updating the installer it works correctly.
When I downgrade MySQL from 8.0.11 to 5.7.22, I encountered this error. Spend a lot of time to fix the bug. Finally, I fix this problem by the following steps:
uninstall all the related features with MySql( use Control Panel > Programs and Features)
go to C: drive, make all hidden files visible(view > hidden items), find ProgramData file
delete the MySql file inside hidden ProgramData file manually.
Make sure all the MySQL files are deleted, reinstall MySQL. It works for me. I successfully installed MySQL 5.7.22 without any problem.
My Guess: This error probably will happen if you are second or third time to install MySql server. It seems like the error happens because the old MySql files are not deleted completely. Usually, we all think that after we uninstall the application, the files are deleted from program files, it is clean, everything was done. However, there still some files hidden from us. We have to delete them by ourselves.
On bug page, last comment states that the latest installer solves this problem.
For me not. The following steps made me a clean install (after get the latest installer):
When it fails on database initialization step just cancel it back to the installer's main page where you can see installed MySQL server with a reconfigure option.
Now edit the my.ini and set the
"lower_case_table_names=0.0"
to
"lower_case_table_names=0"
Click on reconfigure and now it goes over on this problem.
Hope it helps.
I faced the same problem with 1.4.25 installer and resolved that by doing the following steps [without updating the installer]
There is a folder MySQL Installer for Windows\Manifest\Templates
In Templates folder there are few text files which are there to be used as a template during my.ini generation. I have commented out the line lower_case_table_names=
Now I execute the configuration process using installer and it executes without any error.Also I add the variable later and restart the server.
As the bug reported in https://bugs.mysql.com/bug.php?id=91476, upgrade MySQL installer to 1.4.26.0 and reinstall MySQL server would resolve the issue.
When I installed mysql server, wizard of installation was stooped at the point initializing database (if necessary) for that I did.
remove mysql folder from 'C:\ProgramData' folder. Note: ProgramData is hidden. You need to make it visible.
Uninstall mysql server if it was in the list of installed programs in control panel.
Download mysql-installer-web-community-8.0.13.0 and install it again.
I had the same problem, tried to change my.ini did't work, so I uninstalled the SQL server, then I google my operating system + Install MySQL videos (In my case "Install MySQL on Windows 8"), then I installed MySQL 5.6.26 then worked.
I think the newer MySQL doesn't support certain old operating system.

mysql_upgrade and MySQL service - Vicious Circle

I am upgrading MySQL server 5.067 to 5.5.60 on Windows 10.
I stopped the service, replaced bin a shared directory and started the service.
Service start failed with the message (in Event Viewer):
Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
For more information, see Help and Support Center at http://www.mysql.com.
OK, so I opened cmd as admin with the command:
mysql_upgrade --port 64202
With result:
Looking for 'mysql.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysqlcheck.exe
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
The design of MySQL upgrade is connecting over TCP to MySQL to run the upgrade, but how it can possibly work if the service is not running? It is a vicious circle - MySQL service needs to be upgraded to be able to start and mysql_upgrade needs to connect to running service.
What is wrong?
Skipping major versions (5.1) is not supported, and may or may not work. The appropriate upgrade is one of:
Plan A: Upgrade to 5.1, then to 5.5. Run mysql_upgrade at each step.
Plan B: Dump the data from 5.0 with mysqldump. (Be sure to get routines, etc). Blow away (or bypass) 5.0 and install a fresh 5.5. Load the data back in. There may be syntax errors in the dump file, edit the file if needed.
Since you're upgrading from 5.0 to 5.5, there are configuration values which are deprecated, causing the engine to be unable to start.
Most likely culprit is skip-dbd, as explained on this site.
So: find your MySQL configuration file, comment out the skip-dbd option and restart the MySQL service. Then you can run mysql_upgrade with the appropriate options including authentication.

sql.h not found in Linux

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.

Installing mysql noinstall zip archive

I've been trying to use my mysql noinstall zip archive and the steps that I found in some of the websites are not descriptive. Can someone help?
If you follow the instruction here you will be alright. From that page:
Users who are installing from the noinstall package can use the instructions in this section to manually install MySQL. The process for installing MySQL from a Zip archive is as follows:
Extract the archive to the desired install directory
Create an option file
Choose a MySQL server type
Start the MySQL server
Secure the default user accounts
To start the sever run
mysqld --console
and after that run
mysql -u root
to start doing whatever you want.
Notice that MySql will function exactly the same as if you would have installed or configured it to run as a service. Your schema's are stored on disk. If you start it after you've stopped it your previous data will still be there. So it doesn't turn magically into an in-memory database.
If you want to install the MySQL database as a service you can use the command below.
mysqld.exe --install