How to download and install mysqlx plugin into MySQL? - c++

I would like to use mysqlx/xdevapi.h in C++ and for this must be installed MySQL X Plugin in MySQL.
I tried:
mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
I got this message :
ERROR 1126 (HY000): Can't open shared library '/Applications/MAMP/Library/lib/plugin/mysqlx.so' (errno: 2 dlopen(/Applications/MAMP/Library/lib/plugin/mysqlx.so, 2): image not found)
He's right, the plugin isn't really there. As you can see I am using MAMP on MAC OS.
Info about DB server:
Server: Localhost via UNIX socket
Server type: MySQL
Server connection: SSL is not being used Documentation
Server version: 5.7.26 - MySQL Community Server (GPL)
Protocol version: 10
User: root#localhost
Server charset: UTF-8 Unicode (utf8)
Is there a page where to download the plugin? Thank you for help!

Related

Issue with my odbc connector 8.0 that connects to mysql8 in centos7

I tried to connect using isql command (Both are AWS EC2)
# isql -v WebDB
[S1000][unixODBC][MySQL][ODBC 8.0(w) Driver]Can't connect to MySQL server on 'ip:3306' (110)
[ISQL]ERROR: Could not SQLConnect
But I can able connect manually
~**]# mysql -h ip -u useranme -p $pwd**
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 304
Server version: 8.0.29 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]>
I tried to restart opensips that need to connect remote mysql8
/usr/local/sbin/opensips[2905]: ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't connect to MySQL server on 'ip'
/usr/local/sbin/opensips[2905]: ERROR:db_mysql:db_mysql_new_connection: initial connect failed
/usr/local/sbin/opensips[2905]: ERROR:core:db_do_init: could not add connection to the pool
[2905]: ERROR:dialog:init_dlg_db: unable to connect to the database
/usr/local/sbin/opensips[2905]: ERROR:dialog:mod_init: failed to initialize the DB support

Percona AWS RDS Database Backup

I am trying to take a single database backup from AWS RDS through Percona XtraBackup. But it is failing in identifying the rdsdata. I am using Mac.
The command I used-
xtrabackup --host='awsserv-staging.fbyvwz.eu-east-2.rds.amazonaws.com' --port=3306 --user='myusername' --password='myPassword' --backup --databases=db-purchases --target-dir=/Users/myuserdir/percona-xtrabackup --no-lock --datadir=innodb_data_home_dir=/rdsdbdata/db/innodb;
The error I am getting is -
xtrabackup: recognized server arguments: --datadir=innodb_data_home_dir=/rdsdbdata/db/innodb
xtrabackup: recognized client arguments: --host=awsserv-staging.fbyvwz.eu-east-2.rds.amazonaws.com --port=3306 --user=myusername --password=* --backup=1 --databases=db-purchases --target-dir=/Users/myuserdir/percona-xtrabackup --no-lock=1
/opt/homebrew/Cellar/percona-xtrabackup/8.0.27-19/libexec/bin/xtrabackup version 8.0.27-19 based on MySQL server 8.0.27 macos12.2 (arm64) (revision id: 50dbc8dadda) 220510 15:50:47 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=awsserv-staging.fbyvwz.eu-east-2.rds.amazonaws.com;port=3306' as 'myusername' (using password: YES).
220510 15:50:48 version_check Connected to MySQL server
220510 15:50:48 version_check Executing a version check against the server...
220510 15:50:48 version_check Done.
220510 15:50:48 Connecting to MySQL server host: awsserv-staging.fbyvwz.eu-east-2.rds.amazonaws.com, user: myusername, password: set, port: 3306, socket: not set Using server version 8.0.23
Warning: option 'datadir' points to nonexistent directory 'innodb_data_home_dir=/rdsdbdata/db/innodb'
Warning: MySQL variable 'datadir' points to nonexistent directory '/rdsdbdata/db/'
Warning: option 'datadir' has different values:
'innodb_data_home_dir=/rdsdbdata/db/innodb' in defaults file
'/rdsdbdata/db/' in SHOW VARIABLES
xtrabackup: Can't change dir to 'innodb_data_home_dir=/rdsdbdata/db/innodb' (OS errno 2 - No such file or directory) xtrabackup: cannot my_setwd innodb_data_home_dir=/rdsdbdata/db/innodb
The data home directory was changed to /rdsdbdata/db, even though no luck. Could someone please help.

django. Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')

Recieving this error when connecting to MSSQL server
My linux machines details:-
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
MSSQL Server DB details:
version : 2012
Error:
django.db.utils.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')
Python2.7
Driver: pyodbc == 3.0.10
django-pyodbc-azure == 1.8.3.0 django-mssql == 1.6.1 django >= 1.8.3
First, make sure you have the required packages installed (it looks like you may):
# Install pre-requesite packages
sudo apt-get install unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc
Then, make sure you have /etc/freetds/freetds.conf configured properly:
[global]
# TDS protocol version, use:
# 7.3 for SQL Server 2008 or greater (tested through 2014)
# 7.2 for SQL Server 2005
# 7.1 for SQL Server 2000
# 7.0 for SQL Server 7
tds version = 7.2
port = 1433
text size = 64512
# A typical Microsoft server
[dbserverdsn]
host = dbserver.domain.com
port = 1433
tds version = 7.2
Next, make sure you have unixODBC talking correctly through FreeTDS in /etc/odbcinst.ini:
[FreeTDS]
Description = v0.91 with protocol v7.2
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Finally, make sure /etc/odbc.ini sees the FreeTDS data source you created:
[dbserverdsn]
Driver = FreeTDS
Server = dbserver.domain.com
Port = 1433
TDS_Version = 7.2
If you have issues along the way, please try testing with the 'tsql' and 'isql' command line utilities and post any errors you receive. Hopefully, this works.
If the problem is with Django's configuration, please post your Django DATABASES settings for review.

how to start postgresql server on Ubuntu 12.04

I had just installed a PostgreSQL 9.1 on the Ubuntu 12.04 server (hosted by Amazon EWS).When I tried to launch the psql command, the following error message shows up.
psql: could not connect to server: No such file or directory Is the
server running locally and accepting connections on Unix domain
socket "/var/run/postgresql/.s.PGSQL.5432"?
After searching on the web, I found I have to start the Server before using it. By following this initdb link, I still cannot use the postgresql database. Are there any further work (like configuration) should I do to start the server ?
I tried to start the service : service postgresql start
Another error message shows :
No PostgreSQL clusters exist; see "man pg_createcluster"
I received this message running a new installation of Postgres 9.3 on Ubuntu 11.04. The full message was:
$ sudo /etc/init.d/postgresql start
Error: Cannot stat /var/run/postgresql
* No PostgreSQL clusters exist; see "man pg_createcluster"
Turned out that the /var/run/postgresql directory did not exist, and it is in that directory where it was attempting to create a file with the process ID. I created the directory as root and made the "postgres" user the owner, and I was able to start the server.
Further explanation found here:
http://www.postgresql.org/message-id/21044.1326496507#sss.pgh.pa.us

Error on host m/c - can't establish a connection to the server at 127.0.0.1:8888

Hi I'm learning django form kenneth love's GSWD video tutorials.
I'm using windows 7(32bit) and have vagrant and virtual box installed in it. The OS in virtual machine is Ubuntu 12.04 LTS
As asked in the tutorial I did the following
**vagrant#precise32:/vagrant/projects$ source ~/blog.venv/bin/activate
Installed Django
then created project with django-admin.py startproject microblog
(blog.venv)vagrant#precise32:/vagrant/projects$ cd microblog
(blog.venv)vagrant#precise32:/vagrant/projects/microblog$ python
manage.py runserver 0.0.
0.0:8000
Validating models... 0 errors found Django version 1.4.4, using
settings 'microblog.settings' Development server is running at
(http removed)//0.0.0.0:8000/ Quit the server with CONTROL-C.**
After this when I go back to windows 7 browser and run 127.0.0.1:8888 as said in tutorial I get "can't establish a connection to the server at 127.0.0.1:8888" error.
What should I do to get the default "It Worked"-django page ???
Did you change the Vagrantfile to do port forwardings?
For example, in your case, host port 8888 <=> guest port 8000
Vagrant.configure("2") do |config|
config.vm.network :forwarded_port, guest: 8000, host: 8080
end
Refer to the docs: http://docs.vagrantup.com/v2/networking/forwarded_ports.html