Database Impossibile accedere a db mysql da remoto

d0l0r3zsh4d3

Utente Bronze
8 Novembre 2017
5
1
2
26
ciao a tutti! Ho un problemino con un db mysql al quale devo accedere da remoto (un altro dispositivo su stessa rete) e cercando su internet ho scoperto che questa funzione non è abilitata di default, infatti se cerco di connettermi mi da questo errore:
Codice:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.206' (111).
Ho cercato qualche guida su internet, ma quando mi chiede di modificare il file my.cnf (commentare la riga address-bind) non riesco, perchè il mio file è cosi :
Codice:
# 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/

Quindi sono bloccato. Su Stack dicevano di digitare il comando"mysqld" non ho capito bene il motivo, ma in ogni caso mi da un output diverso...

Codice:
2019-04-30 18:19:30 1995984688 [Note] mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 1174 ...
2019-04-30 18:19:30 1995984688 [Warning] Can't create test file /var/lib/mysql/raspberrypi.lower-test
mysqld: One can only use the --user switch if running as root
2019-04-30 18:19:30 1995984688 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
2019-04-30 18:19:30 1995984688 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2019-04-30 18:19:30 1995984688 [ERROR] Plugin 'Aria' init function returned error.
2019-04-30 18:19:30 1995984688 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2019-04-30 18:19:30 1995984688 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2019-04-30 18:19:30 1995984688 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2019-04-30 18:19:30 1995984688 [Note] InnoDB: The InnoDB memory heap is disabled
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-04-30 18:19:30 1995984688 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Using Linux native AIO
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Using generic crc32 instructions
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-04-30 18:19:30 1995984688 [Note] InnoDB: Completed initialization of buffer pool
2019-04-30 18:19:30 1995984688 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2019-04-30 18:19:30 1995984688 [ERROR] InnoDB: The system tablespace must be writable!
2019-04-30 18:19:30 1995984688 [ERROR] Plugin 'InnoDB' init function returned error.
2019-04-30 18:19:30 1995984688 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-04-30 18:19:30 1995984688 [Note] Plugin 'FEEDBACK' is disabled.
2019-04-30 18:19:30 1995984688 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2019-04-30 18:19:30 1995984688 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-04-30 18:19:30 1995984688 [ERROR] Aborting

non ho molta esperienza con mysql, è la prima volta che devo usarlo per un progetto.... qualche consiglio??
 
Se non erro dovresti solo dare i permessi al tuo utente per farlo:

se sei su linux
mysql -u <username> -p
GRANT ALL PRIVILEGES ON *.* TO <username>@'%';
quit