Re: Can't connect to server

From: J.O. Aho <user_at_example.net>
Date: Wed, 27 Mar 2019 21:26:16 +0100
Message-ID: <gg24j8Fbj28U1_at_mid.individual.net>


[Quoted] On 3/27/19 6:48 PM, Fokke Nauta wrote:
> On 27/03/2019 18:34, J.O. Aho wrote:

>> Do you get an error like:
>> ERROR 1049 (42000): Unknown database 'databasename'
>>
>> In this case you have misspelled the database name, fix the typo.
>>
>>
>> Do you get an error like:
>> ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111
>> "Connection refused")
>>
>> Then your grant do not allow connection to the database server, take a
>> look at https://dev.mysql.com/doc/refman/5.7/en/grant.html
>>
>> And add a grant something like:
>> GRANT SELECT ON db2.invoice TO 'jeffrey'_at_'127.0.0.1';
>>
>>
>> If neither of the cases are covered here, please the give us the
>> complete error message.
>>

> 
> I don't get real error messages.
> On my pc I use Helium (a music database program) which wants to connect 
> to the database on the server. Helium says: "Cannot access the selected 
> server."
> I installed Helium on the server itself, and there it connects to the 
> database allright. But not on my pc or another pc.

[Quoted] This can be caused by two different things:

  1. You have only granted localhost user to access the database.

[Quoted] You need to grant privileges for users connecting from other places GRANT SELECT, UPDATE, DELETE ON heliumdb TO 'heliumuser'_at_'*';

Don't forget to flush or restart the database.

2. The mysql server only listens on the lo-network

Check your my.cnf and see that you don't have a bind-address set to 127.0.0.1, if you have change that to 0.0.0.0 and restart your mysql service.

> How do I get error messages? Look into the event viewer on my pc?

[Quoted] Install a mysql client on the linux-pc or windows-pc and connect to the server.

-- 

  //Aho
Received on Wed Mar 27 2019 - 21:26:16 CET

Original text of this message