LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   mysql (mariaDB) fails to connect after upgrade (https://www.linuxquestions.org/questions/debian-26/mysql-mariadb-fails-to-connect-after-upgrade-4175608884/)

kaz2100 06-30-2017 01:49 AM

mysql (mariaDB) fails to connect after upgrade
 
Hya

After upgrade from mysql5.5 to mariaDB10.1), I ran into trouble. I need to figure out what I did wrong.

System. Debian buster amd64 (all files are downloaded from debian repo.)

Problem is that
1. mysql works when invoked locally
Code:

>mysql -u UserName -h localhost -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 10.1.24-MariaDB-6 Debian 9.0

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

so, it is working.
2. But unable to connect via network.
Code:

>mysql -u userName -h hostName.local -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'hostName.local' (111 "Connection refused")
1 ~>

and
3. ssh works with this username@hostName.

Web search gave me several sites, but I don't think they are helpful.
Not much useful settings are seen in files under /etc/mysql/*.

My assumption is that
1. DB server is running and listening to right port.
2. Network privilege is wrong, but nothing is listed on either hosts.allow or hosts.deny.
3. privileges in mariaDB (mysql) are irrelevant.

Question is
Where should I go next?

I appreciate any suggestion.

Thanks in advance.

cheers

bathory 06-30-2017 04:10 AM

Hi,
Quote:

Web search gave me several sites, but I don't think they are helpful.
Not much useful settings are seen in files under /etc/mysql/*.

My assumption is that
1. DB server is running and listening to right port.
2. Network privilege is wrong, but nothing is listed on either hosts.allow or hohsts.deny.
3. privileges in mariaDB (mysql) are irrelevant.

Question is
Where should I go next?
See if this helps.

Regards

kaz2100 07-02-2017 07:26 PM

Hya

Thanks for your reply.

Short answer: yes, problem resolved. My assumption was wrong.

Long answer: I followed the thread mentioned by bathory. Solution 2 is does not work. Solution 1 lead me to a right track. The file to edit is //etc/mysql/mariadb.conf.d/50-server.cnf, not /etc/mysql/my.cnf. The line to edit is "bind-address = 127.0.0.1" (edit whatever IP appropriate) not "skip-networking". I did not touch the line "skip-external-locking"

I guess I overlooked several lines in either mysql or mariadb changelog.

So, take home message is "After upgrade to mariadb, edit conf file, if you use remote server."

cheers

bathory 07-03-2017 02:47 AM

Glad to see you've made it!

Just a FYI:
Quote:

The line to edit is "bind-address = 127.0.0.1" (edit whatever IP appropriate) not "skip-networking". I did not touch the line "skip-external-locking"
You could delete or comment out the "bind-address = ..." line, so mysql/mariaDB will use the defaults, that is to listen on all available interfaces.

Regards


All times are GMT -5. The time now is 12:16 AM.