Jump to content
Sign in to follow this  
MegaN2

Решили поиграть

Recommended Posts

Ну как то решили мы снова побегать в l2 но тут такая вот незадача, проблемная MarinaDB. И так ставлю я сервер поднимаю логин сервер

Спойлер

Exception in thread "main" java.net.BindException: Cannot assign requested address
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
        at java.net.ServerSocket.bind(Unknown Source)
        at java.net.ServerSocket.<init>(Unknown Source)
        at l2p.loginserver.AuthServer.checkFreePorts(AuthServer.java:58)
        at l2p.loginserver.AuthServer.main(AuthServer.java:75)

По ответу стало понятно что какие то проблемы с доступом, сразу я подумал что прав маловато и выдаю всем файлам права 777 но результат тот же. Потом я решил проверить работает ли вообще оно и ставлю все на 127.0.0.1, сервер заработал на ура и тут стало понятно что проблемы с доступом к MarinaDB. После того как погуглил нашел что надо выдать привилегии и желательно не руту. Без проблем:

GREATE USER `base_user`@`%` IDENTIFIED BY 'ПАРОЛЬ';

GRANT ALL PRIVILEGES ON *.* to 'пользователь'@'%';

Внеся изменения в конфы логин сервера все должно было заработать но ничего не поменялось. Опять лезу в тот же гугл и нахожу что надо еще поменять закоментировать bind-address        = 127.0.0.1  правда не сказал где, но после недолгих поисков я выяснил что этот файл называется 50-server.cnf и лежит в /etc/mysql/mariadb.conf.d/ ну после успешного закоментирования я сервер в рестарт и результат конечно же тот же. После чего опять в гугл и там второй гуру говорит что нужно bind-address        = 127.0.0.1 пменять на bind-address        = 0.0.0.0 думаю да без проблем

Спойлер

 

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]

#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 0.0.0.0

#
# * Fine Tuning
#
key_buffer_size        = 16M
max_allowed_packet    = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam_recover_options  = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10

#
# * Query Cache Configuration
#
query_cache_limit    = 1M
query_cache_size        = 16M

#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log_file    = /var/log/mysql/mariadb-slow.log
#long_query_time = 10
#log_slow_rate_limit    = 1000
#log_slow_verbosity    = query_plan
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id        = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size   = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = exclude_database_name

#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!

#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates you can use for example the GUI tool "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
#
# Accept only connections using the latest and most secure TLS protocol version.
# ..when MariaDB is compiled with OpenSSL:
# ssl-cipher=TLSv1.2
# ..when MariaDB is compiled with YaSSL (default in Debian):
# ssl=on

#
# * Character sets
#
# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
# utf8 4-byte character set. See also client.cnf
#
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci

#
# * Unix socket authentication plugin is built-in since 10.0.22-6
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/

# this is only for embedded server
[embedded]

# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]
 


 

Опять меняю все в том же /etc/mysql/mariadb.conf.d/50-server.cnf но результат тот же. Вопрос что не так этой MarinaDB? Чет не придумаю где я накосячил.

Share this post


Link to post
Share on other sites

тему можно закрывать давно решил этот вопрос 

Share this post


Link to post
Share on other sites
9 часов назад, MegaN2 сказал:

тему можно закрывать давно решил этот вопрос 

Выложили б решение вдруг кому то понадобится 

Share this post


Link to post
Share on other sites

mysql же проще юзать под базу, гайдов миллион.

Edited by Rogue

Share this post


Link to post
Share on other sites
17 минут назад, Rogue сказал:

mysql же проще юзать под базу, гайдов миллион.

Ну хотя и то так, зачем сложности. 

Share this post


Link to post
Share on other sites
2 часа назад, Rogue сказал:

mysql же проще юзать под базу, гайдов миллион.

Да не в ней дело было

Share this post


Link to post
Share on other sites
В 18.08.2019 в 15:10, •°•°•PsycHoO•°•°• сказал:

Ну и напишите в чем дело... будет для остальных подсказкой. Кто-то будет искать.

Вот честно правильно и сделал что не написал, на этом форуме никто помогает давно. Я вот тоже имею кучу контента для l2 это примерно 100 гиг на дисках, которые мне и нафиг не нужны но многие из них уже нигде не найти, во всяком случае на халяву, и я конечно делиться не стану ими. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...