Re: Can't connect to server
From: Fokke Nauta <usenet_at_solfon.nl>
Date: Thu, 28 Mar 2019 09:38:07 +0100
Message-ID: <gg3fffFkbn6U1_at_mid.individual.net>
>
>
> This can be caused by two different things:
>
> 1. You have only granted localhost user to access the database.
>
> 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.
>
>
>
> Install a mysql client on the linux-pc or windows-pc and connect to the
> server.
>
Date: Thu, 28 Mar 2019 09:38:07 +0100
Message-ID: <gg3fffFkbn6U1_at_mid.individual.net>
[Quoted] On 27/03/2019 21:26, J.O. Aho wrote:
> 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.
>
> This can be caused by two different things:
>
> 1. You have only granted localhost user to access the database.
>
> 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?
>
> Install a mysql client on the linux-pc or windows-pc and connect to the
> server.
>
[Quoted] I installed MySQL Workbench on my pc. First of all it couldn't find any database. When I tried to connect to a database, an error message appeared: Cannot connect to database server. I also saw that the user is 'root'_at_xxxx.fritz.box, whereas xxxx is the name of my pc, and our router is a Fritzbox. Why is there the extension fritz.box, and does it cause the disability to connect?
BTW, the binding to 0.0.0.0 is in the my.ini file.
And I don't know anything about granted localhost.
Fokke Received on Thu Mar 28 2019 - 09:38:07 CET