View Issue Details

IDProjectCategoryView StatusLast Update
0000761SkyChart1-Softwarepublic11-09-03 14:48
Reportermarc fokker Assigned ToPatrick Chevalley  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSWindowsOS VersionXP
Product Version3.3 SVN 
Target Version3.4Fixed in Version3.3 SVN 
Summary0000761: Skychart can't connect to Mysql
DescriptionI 'm afraid the title says it all..
When attemping to connect I receive the message:
Connection to localhost, 3306 failed! 0
Verify if the MySQL server is running, and control the userid/password.

* I installed mysql version 5.1. (database on different drive, before it seemed not to make any difference)
* The server is running as a WinXP service.
* In a local shell I can connect as root with the same password and do queries.
* I can telnet to it at port 3306, I recieve the version number and some unreadable garbage.

I tried using mysql some times before, also then I wasn't able to use it. Maybe I'm the only one who is attemping to use mysql with Windoze XP? I 'm using mysql for some other databases, It would be nice to do some more data integration on a single DBMS.
TagsNo tags attached.
Attached Files
mysql_databese_error.jpg (196,115 bytes)   
mysql_databese_error.jpg (196,115 bytes)   

Activities

Patrick Chevalley

10-12-13 10:39

administrator   ~0001474

This must work, but the first setting can be difficult because the program restart before you can set the user and password, this make an error on the restart if the user is not root without password.

So as soon the program restart reopen the system setting, set the root password (or another user that can create a database) and click the "Create database" button. Click OK, save the program setting and restart again.

If this not work, check your mysql setting to be sure it listen to the specified ip address, check the parameter bind-address, if not sure set temporarily:
bind-address = 0.0.0.0

If you not want to use the root user, do the following after the initialization:
Run mysql -u root
mysql> grant all on cdc.* to 'cdc' identified by 'cdc';
Then change user and password in the program and save the configuration.



marc fokker

10-12-13 12:52

reporter   ~0001475

Before, I followed the procedure as you discrebed.
I successfully got CdC (todays version) working with MySQL on a laptop with 32bit Windows 7. (And for a moment I felt a little stupid, believing for a little while I was complaining for nothing.) I tried the same procedure on a somewhat older laptop running WinXP, I wasn't successful. I suspect it is related to WinXP..

Patrick Chevalley

10-12-13 13:10

administrator   ~0001476

Marc,
I was doing some testing on my Win7 test machine now.
I get the same error message as you if the program cannot access libmysql.dll.
Try to copy this file to the CdC folder.

marc fokker

10-12-13 14:20

reporter   ~0001477

Yes patrick, that did it! MySQL works now also on the Win XP laptop. Thanks!

marc fokker

10-12-13 16:06

reporter   ~0001478

Still a little strange, it complains when starting CdC. The message is familiar:
SQL database not available.
SQL database software is probably not installed!

Despite that, mysql and CdC seem to work. Checking the existence of the tables goes well. Unfortnately the scan of the image directory while using MySQL doesn't work immediately. When I use 'sqlite', the image directory is read well. After I used sqlite to scan, I can switch back to MySQL. Then the pictures scan goes well.

Displaying the pictures is a bit funny too.
I received the message: Error! Please check the database parameters and load the picture package. It reports no catalogued images, no matter how often I click the Scan Directory button.
Then, suddenly it displayed the SAC-pictures and the pictures (9894) are reported. Anyhow, it displays the pictures and MySQL works..

Patrick Chevalley

10-12-13 18:21

administrator   ~0001479

Yes, this may depend of the mysql version.
I do a few change to correct that and schedule a build for tomorrow morning, please test when the 1605 version is available for download.

http://svn.origo.ethz.ch/viewvc/skychart?view=rev&revision=1603
http://svn.origo.ethz.ch/viewvc/skychart?view=rev&revision=1604
http://svn.origo.ethz.ch/viewvc/skychart?view=rev&revision=1605

marc fokker

10-12-13 21:10

reporter   ~0001480

Hi Patrick,
I thought it would be interesting to test the 'path' setting. On the Windows 7 machine, I seem to have chosen to set the MySQL-binary path automatically by the MySQL installer, on the WinXP machines, I didn't.

In a dos-box I set the path manually, renamed the "libmysql.dll", and tested the path for proper working. Unfortunately CdC replied again with the old error:
Connection to localhost, 3306 failed! 0
Verify if the MySQL server is running, and control the userid/password.

I 'll wait for the next SVN. Thanks!

marc fokker

10-12-14 07:01

reporter   ~0001481

Your latest SVN seems to solve the trouble. It still needs the libmysql.dll in the CdC-program path. Now it doesn't complain at CdC startup. At the moment CdC is busy filling the DB with asteroid information. Later more!

Patrick Chevalley

10-12-14 08:24

administrator   ~0001482

Marc,

I not search for any path when loading a dll, this is the responsibility of the Windows API.
There is explanation for which path it search here:
http://msdn.microsoft.com/en-us/library/ms684175
http://msdn.microsoft.com/en-us/library/ms682586

I tested to put the dll in C:\windows or to another directory which is in the PATH and this work.

Beware if you set the path from a dos window, you must also start skychart from this same window. The change you type here is not system wide but just for your shell.
For permanent path change, open "System properties", Advanced tab, click "Environment Variables" button. Search for the PATH variable and edit, disconnect and login again to make sure the change is active.

marc fokker

10-12-15 00:14

reporter   ~0001484

I had a terrible busy day with little time to test. Still I can report that CdC loads the comets and picture data into the MySQL database without trouble. Loading the MPCORB asteroids data is another matter. It takes hours on my old workstation, but I can be patient too :-) The process is not very demanding from the processor, but according to the disk activity LED there's plenty writing going on.

Patrick Chevalley

10-12-15 18:20

administrator   ~0001485

You can try to optimize the mysql performance, specifically increasing the key buffer help a lot. Try to set key_buffer_size = 256M or more if you have enough memory.

But for me the interest of mysql is only if you want a common database to be used across the network for many workstation. For example put the database on a main station or server and use the same database from the outside telescope control computer. The interest is to avoid to update asteroid and comet on all the computer.

For a standalone system sqlite is by far more simple and more efficient to use.

marc fokker

10-12-15 18:34

reporter   ~0001486

I know that I wasn't using an optimized MySQL server. And most often I use the sqlite too. Anyhow, I can report CdC is technically working with usage of MySQL without a problem. And there will not be many people foolish enough to load 517388 asteroids in their database, but I 'm one of those ;-) So, many thanks again!

Issue History

Date Modified Username Field Change
10-12-12 21:21 marc fokker New Issue
10-12-12 21:21 marc fokker File Added: mysql_databese_error.jpg
10-12-13 10:39 Patrick Chevalley Note Added: 0001474
10-12-13 10:39 Patrick Chevalley Assigned To => Patrick Chevalley
10-12-13 10:39 Patrick Chevalley Status new => feedback
10-12-13 10:39 Patrick Chevalley Target Version 0.3.0 => 3.4
10-12-13 12:52 marc fokker Note Added: 0001475
10-12-13 12:52 marc fokker Status feedback => assigned
10-12-13 13:10 Patrick Chevalley Note Added: 0001476
10-12-13 14:20 marc fokker Note Added: 0001477
10-12-13 16:06 marc fokker Note Added: 0001478
10-12-13 18:21 Patrick Chevalley Note Added: 0001479
10-12-13 21:10 marc fokker Note Added: 0001480
10-12-14 07:01 marc fokker Note Added: 0001481
10-12-14 08:24 Patrick Chevalley Note Added: 0001482
10-12-15 00:14 marc fokker Note Added: 0001484
10-12-15 18:20 Patrick Chevalley Note Added: 0001485
10-12-15 18:34 marc fokker Note Added: 0001486
10-12-16 08:29 Patrick Chevalley Status assigned => resolved
10-12-16 08:29 Patrick Chevalley Resolution open => fixed
10-12-16 08:29 Patrick Chevalley Fixed in Version 0.3.0 => 3.3 SVN
11-09-03 14:48 Patrick Chevalley Status resolved => closed