Re: Can't connect to server

From: Fokke Nauta <usenet_at_solfon.nl>
Date: Thu, 28 Mar 2019 13:59:23 +0100
Message-ID: <gg3upbFnk23U1_at_mid.individual.net>


On 28/03/2019 09:38, Fokke Nauta wrote:
> 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.
>>

>
> 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

I managed to solve the problem.

[Quoted] I had installed MySQL 8.0.13 before. I now installed MySQL 8.0.15. It ran OK, but I couldn't handle the user accounts as the amount of columns of the tables was incorrect. This was due to the fact that the tables were made with 8.0.13, and now 8.0.15 is running. I managed to run mysql_upgrade under Windows from the command prompt and that worked well. Now I was able to create a new user, 'root'_at_'xxxx.fritz.box'. With this user name and password I was able to connect all applications on my pc with the databases.
Thanks all for your help.

Fokke Received on Thu Mar 28 2019 - 13:59:23 CET

Original text of this message