Unable to controlling remotely mysql server - mysql

I need to access a mysql database remotely (from another device connected to the same network). Searching on internet i've knowed Searching that I have to enable remote control, but I couldn't. How can I do?
When I connect, after asking me for the password, it gives me this error:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.206' (111).
I tried to follow some guides until you have to comment bind-address in my.cnf, because "my.cnf" file is like this:
# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
so i can't enable the remote control. Any suggestions?

Related

Where to add ssl turn off script in ini file (mysql 8.0)

I followed other's instruction of how to turn off the ssl in mysql 8.0 but stuck at editing the ini file. I'm not sure where to add the line (skip_ssl).
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
# server_type=3
[mysqld]
# The next three options are mutually exclusive to SERVER_PORT below.
# skip-networking
# enable-named-pipe
# shared-memory
(is it here?)
skip_ssl
#disable_ssl
# shared-memory-base-name=MYSQL
# The Pipe the MySQL Server will use.
# socket=MYSQL
# The access control granted to clients on the named pipe created by the MySQL Server.
# named-pipe-full-access-group=
# The TCP/IP Port the MySQL Server will listen on
port=3306
# Path to installation directory. All paths are usually resolved relative to this.
# basedir="C:/Program Files/MySQL/MySQL Server 8.0/"
Many thanks.

How to change port in mysql in cnf file

I keep trying to change the port number in mysql with a current db that I am using. FOr some reason each time I use this port my spring application throws an error saying the port is already in use even though I use the kill -9 PID command to kill whatever processes is listening on that port. Anyways I used the sudo nano /etc/mysql/my.cnf and created a variable port=3307 like I was told online when searching for a solution. I then restarted mysql using sudo service mysql restart but whenever I enter mysql and enter SHOW VARIABLES WHERE Variable_name = 'port'; it keeps showing up as 3306. The following is my cnf file:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
port=3307
Please help I have been stuck on this for hours and can't seem to solve it. Also if there is anyway that I could just use port 3306 without having to kill it each time I start up that would be great too. Thanks!
port needs to be under a [mysqld] or equivalent section.
Don't kill -9 on databases. They will terminate eventually. Use service controls like systemctl/service.

How to use nifi CaptureChangeMySQL?

Introduction
I have a mysql database that receives regular updates. I want to regularly check this mysql db for changes in Nifi.
For this, the CaptureChangeMySQL processor seems perfect.
However, I am not able to make it work.
I followed this tutorial, but the processor does not catch anything when inserting/deleting rows from database.
Setup
One MySQL on local, accessible at localhost:3306
One nifi on the same machine.
MySQL Config
It has one database named test with a device table in it, containing a bit more than 20k rows.
My my.cnf file, in /etc/mysql/ is the following:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
server_id = 1
log_bin = delta
binlog_format=row
binlog_do_db = source
Nifi CaptureChangeMySQL config
Nifi CDC MapCache config (Distributed Map Cache CLient Service)
Nifi Distributed Map Cache Server Config
With this configuration, my CaptureChange processor just does nothing (at least nothing visible). What am I doing wrong that prevents me to use it ?
In your my.cnf file, you've set binlog_do_db = source.
binlog-do-db makes the master write only statements for the specified DB into its binary log. In your case, it should be set to test.
Refer MySQL 5.7 binlog-do-db=db_name

What should my "my.conf" for mysql look like?

I'm trying to install knowage in a linux virtual machine. To install knowage I have to install mysql.
When I install mysql I get this typical error which I can't solve in any way I've found.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
When I try the command service mysql -status, it tells me:
Can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock''
That directory doesn't exist so looking on the internet, I've found solutions by modifying the file my.conf, but that file looks nothing as examples of other people.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
I don't know it this would solve my problem but it's giving me headache. The main problem is that I can't install knowage due to mysql installation error.
Thank you so much!
Did you tried to to migrate to another database, Knowage has the option to support different types of databases? Install Knowage-Server from release package
On the other hand, if you dont like to change it read this page, it may help you. how to install mariadb on debian 9

changing my.cnf to setup MySQL replication

I am following this tutorial to set up MySQL replication (I am using Ubuntu).
According to the above tutorial, this is the config that I want in my.cnf file:
[mysqld]
log-bin = mysql-bin
server-id = 1
relay-log = relay-log-slave
gtid-mode =ON
enforce-gtid-consistency
binlog_format = MIXED
log_slave_updates
I have found my.cnf under: /etc/mysql:
When I open my.cnf this is the content (not sure why the file icon appears like a short-cut icon?):
#
# The MySQL database server configuration file.
# /****************************/
# You can copy this to one of: /* <-- what does this mean? */
# - "/etc/mysql/my.cnf" to set global options, /****************************/
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
I was expecting to find settings like: log-bin, server-id, gtid-mode in my.cnf. I thought I should just change the setting values. I am not sure if this is the correct file, because non of those setting values exists here...
Also the comment on top of the file tells me that I can copy it to /etc/mysql/my.cnf but this is where I opened the file from!! I am confused by this comment...
Is this the correct file? Am I supposed to add all the settings myself?
Update
Looks like all the settings exists in /etc/mysql/mysql.conf.d/mysqlid.cnf, am I supposed to change this file?
From MySQL 5.7 default configuration file path is /etc/mysql/mysql.conf.d/mysqld.cnf.
Before 5.7 file path will be /etc/mysql/my.cnf or /etc/my.cnf.
If the parameter does not exist, then add in the [mysqld] section of the configuration file.