0

I installed this LAMP: https://github.com/teddysun/lamp

Everything is perfectly setup, I still have to access mysql from outside, I was expecting to find the usual bind-address in mysql config file:

[mysqld]
bind-address = 127.0.0.1

In looking inside the /etc/my.cnf I cannot find any bind-address variable.

I've checked as well into /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf but the are all not-existent file.

Edit

This is the full config:

[mysql]

# CLIENT #
port                           = 3306
socket                         = /tmp/mysql.sock

[mysqld]

# GENERAL #
port                           = 3306
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /tmp/mysql.sock
pid-file                       = /usr/local/mysql/data/mysql.pid
skip-name-resolve
skip-external-locking

# MyISAM #
key-buffer-size                = 32M

# INNODB #
innodb-log-files-in-group      = 2
innodb-log-file-size           = 64M
innodb-flush-log-at-trx-commit = 2
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 256M

# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
max-connections                = 256
thread-cache-size              = 50
open-files-limit               = 1024
table-open-cache               = 400


# SAFETY #
max-allowed-packet             = 16M
max-connect-errors             = 1000000

# DATA STORAGE #
datadir                        = /usr/local/mysql/data

# LOGGING #
log-error                      = /usr/local/mysql/data/mysql-error.log

Is there a specific/different setup for this LAMP script?

  • Can you post the content of my.cnf? Are there any other included config files? – Khaled Aug 30 '17 at 9:43
  • @Khaled tks - see my edit – Mr.Web Aug 30 '17 at 9:55
3

When not specifically defined the bind-address defaults to *

If the address is *, the server accepts TCP/IP connections on all server host IPv6 and IPv4 interfaces if the server host supports IPv6, or accepts TCP/IP connections on all IPv4 addresses otherwise. Use this address to permit both IPv4 and IPv6 connections on all server interfaces. This value is the default.

  • Tks, just to make sure I've made myself clear, the bind-address var is not present, and I still cannot access from outside: Access denied for user '.....'@'IP' (using password: YES) (1045) - even if by default should be * as my IP should fall under the anything (*) – Mr.Web Aug 30 '17 at 9:59
  • 2
    @Mr.Web To access a database via the network, you not only have to set the bind-address (or leave it at the default), but also explicitly allow access per database (table). Read the docs how to do that. "Access denied" points to the later, not the former. – gf_ Aug 30 '17 at 10:10
  • @gf_ Tks! It was a GRANT problem :) – Mr.Web Aug 30 '17 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.