Connecting to MySQL LXC

TaxiDave

New Member
Jul 19, 2021
3
0
1
32
I am trying to connect to my MySQL LXC container from my web server but i can not connect to it.

Getting Error:
mysqli_connect('ip', 'user', 'pass', 'db');

This page isn’t working​

10.0.0.28 is currently unable to handle this request.
HTTP ERROR 500

No matter what i change, i can connect to it on teh web ui.

New to LXC Containers is there something i'm missing?

Proxmox 7.0
 
Last edited:
hi,

10.0.0.28 is currently unable to handle this request.
is mysql listening on that IP address? check ss -antlp in the container and look for port 3306 to see where it's bound
 
hi,


is mysql listening on that IP address? check ss -antlp in the container and look for port 3306 to see where it's bound
Code:
State          Recv-Q         Send-Q                 Local Address:Port                  Peer Address:Port
LISTEN         0              80                                 *:3306                             *:*            users:(("mysqld",pid=3368,fd=21))
 
is there a firewall?

10.0.0.28 is currently unable to handle this request.
HTTP ERROR 500
anything in the journal? error messages from mysql or web server?
 
is there a firewall?


anything in the journal? error messages from mysql or web server?
Haven't configured anything on the firewall.

Error when i tried to connect with @remote user not with normal user and

Code:
2021-07-13 14:27:28 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/e
n/library/xtradbinnodb-file-format/
2021-07-13 14:27:28 0 [Note] InnoDB: Using Linux native AIO
2021-07-13 14:27:28 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-07-13 14:27:28 0 [Note] InnoDB: Uses event mutexes
2021-07-13 14:27:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-07-13 14:27:28 0 [Note] InnoDB: Number of pools: 1
2021-07-13 14:27:28 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-07-13 14:27:28 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-07-13 14:27:28 0 [Note] InnoDB: Completed initialization of buffer pool
2021-07-13 14:27:28 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-07-13 14:27:28 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-07-13 14:27:28 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-07-13 14:27:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-07-13 14:27:28 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-07-13 14:27:28 0 [Note] InnoDB: Waiting for purge to start
2021-07-13 14:27:28 0 [Note] InnoDB: 10.3.27 started; log sequence number 1625497; transaction id 20
2021-07-13 14:27:28 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-07-13 14:27:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-07-13 14:27:28 0 [Note] InnoDB: Buffer pool(s) load completed at 210713 14:27:28
2021-07-13 14:27:28 0 [Note] Server socket created on IP: '::'.
2021-07-13 14:27:28 0 [Note] Reading of all Master_info entries succeeded
2021-07-13 14:27:28 0 [Note] Added new Master_info '' to hash table
2021-07-13 14:27:28 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.27-MariaDB-0+deb10u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 10

Don't know where errors would be on web server.