LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-30-2017, 01:49 AM   #1
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Rep: Reputation: 108Reputation: 108
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

Last edited by kaz2100; 07-02-2017 at 07:31 PM. Reason: typo
 
Old 06-30-2017, 04:10 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
Old 07-02-2017, 07:26 PM   #3
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Original Poster
Rep: Reputation: 108Reputation: 108
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

Last edited by kaz2100; 07-02-2017 at 07:32 PM. Reason: typo
 
Old 07-03-2017, 02:47 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mysql (mariadb) fails to start after randomly exiting in Ubuntu 16.04 JohnLocke Linux - Server 14 01-13-2018 11:13 AM
mysql -u root -p fails to connect jojanmpaul Linux - Software 3 04-23-2014 11:10 PM
LXer: 10 Easy Steps to Upgrade from MySQL to MariaDB on CentOS 6.4 LXer Syndicated Linux News 0 06-06-2013 10:21 PM
[SOLVED] Postfix can't connect MySQL after upgrade Ubuntu and MySQL PosiRob Linux - Software 1 07-02-2012 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration