Can't connect to MySQL server on (ip or domain name)

前端 未结 6 2138
旧巷少年郎
旧巷少年郎 2021-02-13 16:48

I\'m trying to configure a web server (Debian 7). I followed this tutorial. I\'m renting my server thanks to gandi.net service. And i have now apache2, mysql, php5 up and runnin

6条回答
  •  不思量自难忘°
    2021-02-13 17:34

    I was trying to find .cnf file hence I did the following:

    sudo find / -name "*.cnf"
    
    /etc/mysql/mysql.conf.d/mysqld.cnf
    /etc/mysql/my.cnf
    /etc/mysql/mysql.cnf
    /etc/mysql/conf.d/mysqldump.cnf
    /etc/mysql/conf.d/mysql.cnf
    

    I edited /etc/mysql/mysql.conf.d/mysqld.cnf based on

    strace mysql ";" 2>&1  | grep cnf
    
    stat("/etc/my.cnf", 0x7ffda9472660)     = -1 ENOENT (No such file or directory)
    stat("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=683, ...}) = 0
    open("/etc/mysql/my.cnf", O_RDONLY)     = 3
    stat("/etc/mysql/conf.d/mysql.cnf", {st_mode=S_IFREG|0644, st_size=8, ...}) = 0
    open("/etc/mysql/conf.d/mysql.cnf", O_RDONLY) = 4
    stat("/etc/mysql/conf.d/mysqldump.cnf", {st_mode=S_IFREG|0644, st_size=55, ...}) = 0
    open("/etc/mysql/conf.d/mysqldump.cnf", O_RDONLY) = 4
    stat("/etc/mysql/mysql.conf.d/mysqld.cnf", {st_mode=S_IFREG|0644, st_size=3034, ...}) = 0
    open("/etc/mysql/mysql.conf.d/mysqld.cnf", O_RDONLY) = 4
    stat("/etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf", {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
    open("/etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf", O_RDONLY) = 4
    stat("/root/.my.cnf", 0x7ffda9472660)   = -1 ENOENT (No such file or directory)
    stat("/root/.mylogin.cnf", 0x7ffda9472660) = -1 ENOENT (No such file or directory)
    

    And changed bind-address to my local IP address.

提交回复
热议问题