Jump to content

Aborted connection to db, changed MYSQL to MARIADB


Recommended Posts

Hello, I changed mysql to mariadb

I did change storage engine from MyISAM to Aria storage engine and im getting all this errors, again and again..

I changed everywhere my ip from VPS
after I start the metin server metin in console looks fine all everything without errors, but in log file in mysql
What to do?

2024-01-30 12:43:38 0 [Note] Starting MariaDB 10.11.6-MariaDB source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 826
2024-01-30 12:43:38 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-01-30 12:43:38 0 [Note] InnoDB: Number of transaction pools: 1
2024-01-30 12:43:38 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-01-30 12:43:38 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-01-30 12:43:38 0 [Note] InnoDB: Completed initialization of buffer pool
2024-01-30 12:43:38 0 [Note] InnoDB: End of log at LSN=36961
2024-01-30 12:43:38 0 [Note] InnoDB: 128 rollback segments are active.
2024-01-30 12:43:38 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-01-30 12:43:38 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-01-30 12:43:38 0 [Note] InnoDB: log sequence number 36961; transaction id 4
2024-01-30 12:43:38 0 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool
2024-01-30 12:43:38 0 [Note] InnoDB: Buffer pool(s) load completed at 240130 12:43:38
2024-01-30 12:43:38 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-01-30 12:43:38 0 [Note] Server socket created on IP: '::'.
2024-01-30 12:43:38 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-01-30 12:43:38 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2024-01-30 12:43:38 0 [Note] /usr/local/libexec/mariadbd: ready for connections.
Version: '10.11.6-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  FreeBSD Ports
2024-01-30 12:46:20 40 [Note] Detected table cache mutex contention at instance 1: 53% waits. Additional table cache instance activated. Number of instances after activation: 2.
2024-01-30 12:47:32 23 [Warning] Aborted connection 23 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 14 [Warning] Aborted connection 14 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 22 [Warning] Aborted connection 22 to db: 'account' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 27 [Warning] Aborted connection 27 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 24 [Warning] Aborted connection 24 to db: 'account' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 30 [Warning] Aborted connection 30 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 26 [Warning] Aborted connection 26 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 54 [Warning] Aborted connection 54 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)

Edited by czeqwerty1337
I did some change
Link to comment
Share on other sites

I got local server I got everything works there, but when I was going to change it from local to VPS and I did everything I did on local server and on VPS server unlikely its not working with this error, thats everything i did. I can send you some my.cnf or something it can help you to solve this problem man... I really trying to fix it hours and still no success. I appreciate every help. Thanks

server.cnf:

 

# Options specific to server applications, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#server-option-groups

# Options specific to all server programs
[server]

# Options specific to MariaDB server programs
[server-mariadb]

#
# Options for specific server tools
#

[mysqld]
user                = mysql
port                = 3306
socket              = /var/run/mysql/mysql.sock
bind-address        = 0.0.0.0
basedir             = /usr/local
datadir             = /var/db/mysql
net_retry_count     = 16384
log_error           = /var/log/mysql/mysqld.err
log_warnings        = 1
sql_mode            = NO_ENGINE_SUBSTITUTION
#default_storage_engine = Aria
skip_name_resolve
max_allowed_packet  = 512M
wait_timeout        = 7200
interactive_timeout = 7200
max_connections     = 600

# Additional settings to help with aborted connections
net_read_timeout    = 30
net_write_timeout   = 60

# Security settings
# Ensure you have strong, unique passwords for all accounts

# [mysqld] configuration for ZFS (uncomment if using ZFS)
# zroot/mysql      compression=on recordsize=128k atime=off
# zroot/mysql/data recordsize=16k
# zroot/mysql/logs
# datadir          = /var/db/mysql/data
# innodb_log_group_home_dir  = /var/db/mysql/log
# audit_log_file   = /var/db/mysql/log/audit.log
# general_log_file = /var/db/mysql/log/general.log
# log_bin          = /var/db/mysql/log/mysql-bin
# relay_log        = /var/db/mysql/log/relay-log
# slow_query_log_file = /var/db/mysql/log/slow.log
# innodb_doublewrite = 0
# innodb_flush_method = O_DSYNC

# Options read by `mariadb_safe`
[mariadb-safe]

# Options read my `mariabackup`
[mariabackup]

# Options read by `mysql_upgrade`
[mariadb-upgrade]

# Specific options read by the mariabackup SST method
[sst]

# Options read by `mysqlbinlog`
[mariadb-binlog]

# Options read by `mysqladmin`
[mariadb-admin]
 

Edited by czeqwerty1337
Link to comment
Share on other sites

Okay, i help you.

Eg. i use IP VPS (IP is not real): 177.22.33.44 for this TuT.

First one, change from:

bind-address        = 0.0.0.0

to:

bind-address        = 127.0.0.1, 177.22.33.44

Yes, you must BIND IP too in VPS.

Step two, in file:

hosts

from:

/etc/

Comment out the lines that start with:
 

::1

eg.:

# The following lines are desirable for IPv6 capable hosts
#::1 vmi33.hosts.net vmi33
#::1 localhost.localdomain localhost
#::1 localhost6.localdomain6 localhost6

P.S. name: vmi33.hosts.net vmi33 its not real, i use fake name only for a TuT.
Its ipv6 btw.

and now restart MariaDB, probably command is:

service mysql-server restart 

 

I hope its works, if dont work then i give you more information. 

Link to comment
Share on other sites

Still no success..

 

2024-01-30 23:34:42 0 [Note] Starting MariaDB 10.11.6-MariaDB source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 1019
2024-01-30 23:34:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-01-30 23:34:42 0 [Note] InnoDB: Number of transaction pools: 1
2024-01-30 23:34:42 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-01-30 23:34:42 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-01-30 23:34:42 0 [Note] InnoDB: Completed initialization of buffer pool
2024-01-30 23:34:42 0 [Note] InnoDB: End of log at LSN=36961
2024-01-30 23:34:42 0 [Note] InnoDB: 128 rollback segments are active.
2024-01-30 23:34:42 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-01-30 23:34:42 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-01-30 23:34:42 0 [Note] InnoDB: log sequence number 36961; transaction id 4
2024-01-30 23:34:42 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-01-30 23:34:42 0 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool
2024-01-30 23:34:42 0 [Note] InnoDB: Buffer pool(s) load completed at 240130 23:34:42
2024-01-30 23:34:42 0 [Note] Server socket created on IP: '::'.
2024-01-30 23:34:42 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-01-30 23:34:42 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2024-01-30 23:34:42 0 [Note] /usr/local/libexec/mariadbd: ready for connections.
Version: '10.11.6-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  FreeBSD Ports
2024-01-30 23:36:08 14 [Warning] Aborted connection 14 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 57 [Warning] Aborted connection 57 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 54 [Warning] Aborted connection 54 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 53 [Warning] Aborted connection 53 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 47 [Warning] Aborted connection 47 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 23 [Warning] Aborted connection 23 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 28 [Warning] Aborted connection 28 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 59 [Warning] Aborted connection 59 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)

I did the changes here in /etc/hosts :

 

# $FreeBSD$
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
#::1			localhost localhost.my.domain #metinek
127.0.0.1		localhost localhost.my.domain #metinek
xxx.xxx.xxx.xxx          xxx-xxx-xxx-xx.hicoria.com serverside
#
# Imaginary network.
#10.0.0.2		myname.my.domain myname
#10.0.0.3		myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#	10.0.0.0	-   10.255.255.255
#	172.16.0.0	-   172.31.255.255
#	192.168.0.0	-   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#


Then in server.cnf :


 

# Options specific to server applications, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#server-option-groups

# Options specific to all server programs
[server]

# Options specific to MariaDB server programs
[server-mariadb]

#
# Options for specific server tools
#

[mysqld]
user                = mysql
port                = 3306
socket              = /var/run/mysql/mysql.sock
bind-address        = 127.0.0.1, xxx.xxx.xxx.xxx
basedir             = /usr/local
datadir             = /var/db/mysql
net_retry_count     = 16384
log_error           = /var/log/mysql/mysqld.err
log_warnings        = 1
sql_mode            = NO_ENGINE_SUBSTITUTION
#default_storage_engine = Aria
skip_name_resolve
max_allowed_packet  = 512M
wait_timeout        = 7200
interactive_timeout = 7200
max_connections     = 600

# Additional settings to help with aborted connections
net_read_timeout    = 30
net_write_timeout   = 60

# Security settings
# Ensure you have strong, unique passwords for all accounts

# [mysqld] configuration for ZFS (uncomment if using ZFS)
# zroot/mysql      compression=on recordsize=128k atime=off
# zroot/mysql/data recordsize=16k
# zroot/mysql/logs
# datadir          = /var/db/mysql/data
# innodb_log_group_home_dir  = /var/db/mysql/log
# audit_log_file   = /var/db/mysql/log/audit.log
# general_log_file = /var/db/mysql/log/general.log
# log_bin          = /var/db/mysql/log/mysql-bin
# relay_log        = /var/db/mysql/log/relay-log
# slow_query_log_file = /var/db/mysql/log/slow.log
# innodb_doublewrite = 0
# innodb_flush_method = O_DSYNC

# Options read by `mariadb_safe`
[mariadb-safe]

# Options read my `mariabackup`
[mariabackup]

# Options read by `mysql_upgrade`
[mariadb-upgrade]

# Specific options read by the mariabackup SST method
[sst]

# Options read by `mysqlbinlog`
[mariadb-binlog]

# Options read by `mysqladmin`
[mariadb-admin]

 

Link to comment
Share on other sites

40 minutes ago, czeqwerty1337 said:

Still no success..

 

2024-01-30 23:34:42 0 [Note] Starting MariaDB 10.11.6-MariaDB source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 1019
2024-01-30 23:34:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-01-30 23:34:42 0 [Note] InnoDB: Number of transaction pools: 1
2024-01-30 23:34:42 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-01-30 23:34:42 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-01-30 23:34:42 0 [Note] InnoDB: Completed initialization of buffer pool
2024-01-30 23:34:42 0 [Note] InnoDB: End of log at LSN=36961
2024-01-30 23:34:42 0 [Note] InnoDB: 128 rollback segments are active.
2024-01-30 23:34:42 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-01-30 23:34:42 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-01-30 23:34:42 0 [Note] InnoDB: log sequence number 36961; transaction id 4
2024-01-30 23:34:42 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-01-30 23:34:42 0 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool
2024-01-30 23:34:42 0 [Note] InnoDB: Buffer pool(s) load completed at 240130 23:34:42
2024-01-30 23:34:42 0 [Note] Server socket created on IP: '::'.
2024-01-30 23:34:42 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-01-30 23:34:42 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2024-01-30 23:34:42 0 [Note] /usr/local/libexec/mariadbd: ready for connections.
Version: '10.11.6-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  FreeBSD Ports
2024-01-30 23:36:08 14 [Warning] Aborted connection 14 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 57 [Warning] Aborted connection 57 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 54 [Warning] Aborted connection 54 to db: 'common' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 53 [Warning] Aborted connection 53 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:08 47 [Warning] Aborted connection 47 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 23 [Warning] Aborted connection 23 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 28 [Warning] Aborted connection 28 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 23:36:09 59 [Warning] Aborted connection 59 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)

I did the changes here in /etc/hosts :

 

# $FreeBSD$
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
#::1			localhost localhost.my.domain #metinek
127.0.0.1		localhost localhost.my.domain #metinek
xxx.xxx.xxx.xxx          xxx-xxx-xxx-xx.hicoria.com serverside
#
# Imaginary network.
#10.0.0.2		myname.my.domain myname
#10.0.0.3		myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#	10.0.0.0	-   10.255.255.255
#	172.16.0.0	-   172.31.255.255
#	192.168.0.0	-   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#


Then in server.cnf :


 

# Options specific to server applications, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#server-option-groups

# Options specific to all server programs
[server]

# Options specific to MariaDB server programs
[server-mariadb]

#
# Options for specific server tools
#

[mysqld]
user                = mysql
port                = 3306
socket              = /var/run/mysql/mysql.sock
bind-address        = 127.0.0.1, xxx.xxx.xxx.xxx
basedir             = /usr/local
datadir             = /var/db/mysql
net_retry_count     = 16384
log_error           = /var/log/mysql/mysqld.err
log_warnings        = 1
sql_mode            = NO_ENGINE_SUBSTITUTION
#default_storage_engine = Aria
skip_name_resolve
max_allowed_packet  = 512M
wait_timeout        = 7200
interactive_timeout = 7200
max_connections     = 600

# Additional settings to help with aborted connections
net_read_timeout    = 30
net_write_timeout   = 60

# Security settings
# Ensure you have strong, unique passwords for all accounts

# [mysqld] configuration for ZFS (uncomment if using ZFS)
# zroot/mysql      compression=on recordsize=128k atime=off
# zroot/mysql/data recordsize=16k
# zroot/mysql/logs
# datadir          = /var/db/mysql/data
# innodb_log_group_home_dir  = /var/db/mysql/log
# audit_log_file   = /var/db/mysql/log/audit.log
# general_log_file = /var/db/mysql/log/general.log
# log_bin          = /var/db/mysql/log/mysql-bin
# relay_log        = /var/db/mysql/log/relay-log
# slow_query_log_file = /var/db/mysql/log/slow.log
# innodb_doublewrite = 0
# innodb_flush_method = O_DSYNC

# Options read by `mariadb_safe`
[mariadb-safe]

# Options read my `mariabackup`
[mariabackup]

# Options read by `mysql_upgrade`
[mariadb-upgrade]

# Specific options read by the mariabackup SST method
[sst]

# Options read by `mysqlbinlog`
[mariadb-binlog]

# Options read by `mysqladmin`
[mariadb-admin]

 

Yes almost success, please stop MariaDB and use command for rename folder mysql to old_mysql:

Command:

mv /var/db/mysql /var/db/old_mysql

And reboot.

Next step, i have a question, did you have full backup in .sql?
In MariaDB and MySQL 5.7/ 8.0 not make backup only folder account etc.. yu must all packed, but i preffer always pack MySQL in .sql
I have mega script backup for all databases, but i must translate to EN and i will give for this forum for free soon.

Next Question, old databases you have MySQL5.6? 
MySQL5.6 still is supported in FreeBSD 13.x

 

If you have old databases and still work, I can help you faster via AnyDesk

Edited by kamil2321
Link to comment
Share on other sites

Okay I did mv /var/db/mysql /var/db/old_mysql

On old server there was mysql56 but i removed it and replace it with mariadb with newest version
Should i use the old mysql56 (but it was very buggy)

Or

I dont have .sql backup

I have backup mysql folder on local server where is everything working fine.. So I can use my mysql backup folder for that.

  • Eyes 1
Link to comment
Share on other sites

50 minutes ago, czeqwerty1337 said:

Okay I did mv /var/db/mysql /var/db/old_mysql

On old server there was mysql56 but i removed it and replace it with mariadb with newest version
Should i use the old mysql56 (but it was very buggy)

Or

I dont have .sql backup

I have backup mysql folder on local server where is everything working fine.. So I can use my mysql backup folder for that.

So you have local server and if still work, then i can help you via AnyDesk? 
 

Link to comment
Share on other sites

2024-01-30 12:47:32 24 [Warning] Aborted connection 24 to db: 'account' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 30 [Warning] Aborted connection 30 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 26 [Warning] Aborted connection 26 to db: 'player' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)
2024-01-30 12:47:32 54 [Warning] Aborted connection 54 to db: 'log' user: 'serverside' host: '224-249-203-89.hicoria.com' (Got an error reading communication packets)

These errors are gone.. but when i start server everything connected well. But in auth and channel folders im getting in syslog this:

 

Feb  1 01:34:30 :: SYSTEM: closing client socket. DESC #14
Feb  1 01:34:33 :: SYSTEM: Trying to connect to xx.xx.xx.xx:30051
Feb  1 01:34:33 :: SYSTEM: connected to server (fd 14, ptr 0x2895e600)
Feb  1 01:34:33 :: PARTY Disable
Feb  1 01:34:33 :: SYSTEM: closing client socket. DESC #14
Feb  1 01:34:36 :: SYSTEM: Trying to connect to xx.xx.xx.xx:30051
Feb  1 01:34:36 :: SYSTEM: connected to server (fd 14, ptr 0x2895e600)
Feb  1 01:34:36 :: PARTY Disable
Feb  1 01:34:36 :: SYSTEM: closing client socket. DESC #14
Feb  1 01:34:39 :: SYSTEM: Trying to connect to xx.xx.xx.xx:30051
Feb  1 01:34:39 :: SYSTEM: connected to server (fd 14, ptr 0x2895e600)
Feb  1 01:34:39 :: PARTY Disable
Feb  1 01:34:39 :: SYSTEM: closing client socket. DESC #14
SYSERR: Feb  1 01:34:41 :: safe_create: calloc failed [12] Cannot allocate memory
SYSERR: Feb  1 01:34:41 :: buffer_new: calloc failed [12] Cannot allocate memory

I increased a RAM for my VPS for 6GB to 15GB and still it dosent help, and im getting this error on all channels and auth, Cannot allocate memory (i tought it was low RAM but no)..

Link to comment
Share on other sites

I do not have time to read full topic, but I using, and as I see, you using too last (from package) mariadb 10.11 already

My easy friendlyuse tut its: (only clean freebsd install, because when you uninstall mysql, so its fine or !!!necessary to delete that folder become install new mysql sever - how some guys said before me, etc.. Now idk I rlly just only scroll, so maybe is here solution)

1. pkg install mariadb-server (you can use pkg search mariadb, but when you use pkg (last freebsd) its actual for that version, so you dont must define version, its just simple to install last..)
2. (go to rc.cong -> add mysql_enable="YES")
3. run first time mariadb via command like "service mysql-server start" then that coma create new mysql folder and create basic settings from new install..
4. First of all is better or required to stop mysql (service mysql-server stop) go to -> /usr/local/etc/mysql/conf.d and open server.cnf
this is a very simple so you do this steps:

1.

bind-address			= 127.0.0.1

comment this line like #[space] so should looks like:

# bind-address			= 127.0.0.1


for some tables whats just wrong and I think you dont repair it before, you can or "must" add this line:

sql_mode = NO_ENGINE_SUBSTITUTION

under all that just in mysqld table 😄 so its for me after this line..: # innodb_flush_method        = O_DSYNC

5. Now you can run your mariadb simple via service mysql-server start..


6. Run command: mysql_secure_installation (its speficied by your settings, but I think there is no much ways to set it different)

7. create new user something like:

CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

for login in navicat, so here you just change password by your password..
 

CREATE USER 'game'@'127.0.0.1' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'game'@'127.0.0.1' WITH GRANT OPTION;

and this is for your internal communication, simple this is that one thing what you have in config 😄 too dont forgot change password 😄

8. Now you just flush tables like

flush privileges;


and thats all you can quit like (quit;) and working 😄 


btw: Sorry for my english and when you have some question you can ask me..


src: For source you must in log.cpp delete DELAYED, because its not as I know supported like that in mariadb.. Second change is change libmysqlclient.a to libmariadbclient.a in makefile 😄

I think thats all, so maybe you can got problem with AsyncSQL.cpp (its in libsql)
but you can solve that very simple:

You can replace connect function with that one:
 

bool CAsyncSQL::Connect()
{
	if (0 == mysql_init(&m_hDB))
	{
		fprintf(stderr, "mysql_init failed\n");
		return false;
	}

	//mysql_options(&m_hDB, MYSQL_SET_CHARSET_NAME, m_stLocale.c_str());
	if (!m_stLocale.empty())
	{
		//mysql_options(&m_hDB, MYSQL_SET_CHARSET_DIR , " /usr/local/share/mysql/charsets/");
		//mysql_options(&m_hDB, MYSQL_SET_CHARSET_DIR , "/usr/local/share/mysql/charsets");
		//mysql_options(&m_hDB, MYSQL_SET_CHARSET_DIR , "/usr/local/share/mysql");
		if (mysql_options(&m_hDB, MYSQL_SET_CHARSET_NAME, m_stLocale.c_str()) != 0)
		{
			fprintf(stderr, "mysql_option failed : MYSQL_SET_CHARSET_NAME %s ", mysql_error(&m_hDB));
		}
	}

	if (!mysql_real_connect(&m_hDB, m_stHost.c_str(), m_stUser.c_str(), m_stPassword.c_str(), m_stDB.c_str(), m_iPort, NULL, CLIENT_MULTI_STATEMENTS))
	{
		fprintf(stderr, "mysql_real_connect: %s\n", mysql_error(&m_hDB));
		return false;
	}

	// my_bool -> bool
	bool reconnect = true;

	if (0 != mysql_options(&m_hDB, MYSQL_OPT_RECONNECT, &reconnect))
		fprintf(stderr, "mysql_option: %s\n", mysql_error(&m_hDB));

	// removed reconnect
	// fprintf(stdout, "AsyncSQL: connected to %s (reconnect %d)\n", m_stHost.c_str(), m_hDB.reconnect);
	fprintf(stdout, "AsyncSQL: connected to %s\n", m_stHost.c_str());

	m_ulThreadID = mysql_thread_id(&m_hDB);

	m_bConnected = true;
	return true;
}

Just to remove reconnect and nothing more 😄

Edited by Filachilla
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.