The FAQ error: _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)") is in the error log, but the service is running and in the MYSQL command line it seems to be running too.
Connection id: 10
Current database: fpdb
Current user: root@localhost
SSL: Not in use
...
I know it's late, so as always help appreciated.
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That looks like a firewall issue, if the command line mysql works (mysql -u fpdb -p), then you may need to allow fpdb to connect to mysql through your firewall.
Carl G
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the quick reply, command works fine, but even with deactivated firewall nothing happens, tried rebooting aswell, mysql service starts normal. I must be missing something...
There is a HUD-error listed aswell but I am not sure if it is relevant:
quote
Exception exceptions.KeyError: KeyError(-1211377984,) in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored
/quote
Thanks again,
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ran it from command line, ends with:
Reading configuration file HUD_config.xml
Seems normal^^.
fpdb-error-log.txt:
quote
Traceback (most recent call last):
File "fpdb.py", line 448, in <module>
me = fpdb()
File "fpdb.py", line 361, in __init__
self.load_profile()
File "fpdb.py", line 266, in load_profile
self.db.connect(self.settings['db-backend'], self.settings['db-host'], self.settings['db-databaseName'], self.settings['db-user'], self.settings['db-password'])
File "C:\Dokumente und Einstellungen\Lennart\Eigene Dateien\sourceforge\pyfpdb\fpdb_db.py", line 43, in connect
self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database)
File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 74, in Connect
return Connection(*args, **kwargs)
File "C:\Python25\lib\site-packages\MySQLdb\connections.py", line 170, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")
\quote
HUD_config.xml - changed db_pass to ***** for post:
quote
<database db_name="fpdb" db_server="mysql" db_ip="localhost" db_user="fpdb" db_pass="*****" db_type="fpdb"> </database>
\quote
Thank you,
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm guessing that i somehow configured the database wrong, but i can't seem to find where. Is there anymore information I can provide? I installed mysql manually as the installer wouldnt do it for me (even though i'm using xp) and executed the commands to create the fpdb table. Should I maybe get phpMyAdmin to manually access the database?
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can try phpmyadmin - i've never tried using it.
You should be able to do the following from the command line:
# mysql -u fpdb -p
<your fpdb pass>
mysql> use fpdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
If that all works from the command line then mysql is configured correctly (NOTE: You may not have all the tables yet)
Try creating a dummy table:
mysql>CREATE TABLE example(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), age INT);
Query OK, 0 rows affected (0.01 sec)
If that works then its the fpdb config
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My cheat sheet says that error 2003 is mysql not running. Check that by right clicking on My Computer, selecting manage, navigating to services and looking at mysql. If it is not running, you _should_ be able to start it there.
this message is not your problem:
quote
Exception exceptions.KeyError: KeyError(-1211377984,) in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored
/quote
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, thanks for the replies. The service is running, mentioned that earlier, but one thing is different now: I created the dummy table and on show tables nothing comes up, any ideas?
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=100
# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0
# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=18M
# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before. This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8
\quote
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the spam, but i have a feeling the problem might be the db_user argument as i cant recall having defined fpdb as a user anywhere, if that needs to be done, where can i do it.
All help appreciated,
Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try the mysql stuff near the top, where it is talking about Vista--it doesn't matter if you are not using vista. That should create an fpdb database and give a user named fpdb access to it.
If it starts blathering about having a database named fpdb, delete it using this statement:
DROP DATABASE fpdb;
and do Creat/Grant/Flush stuff again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey again, I managed to get it up and running. I don't know why it wouldn't run on the ports i had set out but i changed them round to different ones and opened those aswell and now it works. Thanks to everyone who put in an effort to help me!
Regards,
Lennart
P.S.: Don't be happy yet, in a few hours I will probably come up with more problems :).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The FAQ error: _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)") is in the error log, but the service is running and in the MYSQL command line it seems to be running too.
Connection id: 10
Current database: fpdb
Current user: root@localhost
SSL: Not in use
...
I know it's late, so as always help appreciated.
Lennart
Depends on your timezone :)
That looks like a firewall issue, if the command line mysql works (mysql -u fpdb -p), then you may need to allow fpdb to connect to mysql through your firewall.
Carl G
Thank you for the quick reply, command works fine, but even with deactivated firewall nothing happens, tried rebooting aswell, mysql service starts normal. I must be missing something...
There is a HUD-error listed aswell but I am not sure if it is relevant:
quote
Exception exceptions.KeyError: KeyError(-1211377984,) in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored
/quote
Thanks again,
Lennart
Can you run fpdb.py from the command line and post the contents of fpdb-error.txt please?
Can you post the <database db_name="... line too please
Carl G
Ran it from command line, ends with:
Reading configuration file HUD_config.xml
Seems normal^^.
fpdb-error-log.txt:
quote
Traceback (most recent call last):
File "fpdb.py", line 448, in <module>
me = fpdb()
File "fpdb.py", line 361, in __init__
self.load_profile()
File "fpdb.py", line 266, in load_profile
self.db.connect(self.settings['db-backend'], self.settings['db-host'], self.settings['db-databaseName'], self.settings['db-user'], self.settings['db-password'])
File "C:\Dokumente und Einstellungen\Lennart\Eigene Dateien\sourceforge\pyfpdb\fpdb_db.py", line 43, in connect
self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database)
File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 74, in Connect
return Connection(*args, **kwargs)
File "C:\Python25\lib\site-packages\MySQLdb\connections.py", line 170, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")
\quote
HUD_config.xml - changed db_pass to ***** for post:
quote
<database db_name="fpdb" db_server="mysql" db_ip="localhost" db_user="fpdb" db_pass="*****" db_type="fpdb"> </database>
\quote
Thank you,
Lennart
I'm guessing that i somehow configured the database wrong, but i can't seem to find where. Is there anymore information I can provide? I installed mysql manually as the installer wouldnt do it for me (even though i'm using xp) and executed the commands to create the fpdb table. Should I maybe get phpMyAdmin to manually access the database?
Lennart
You can try phpmyadmin - i've never tried using it.
You should be able to do the following from the command line:
# mysql -u fpdb -p
<your fpdb pass>
mysql> use fpdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql>show tables;
show tables;
+-----------------+
| Tables_in_fpdb |
+-----------------+
| Autorates |
| BoardCards |
| Gametypes |
| Hands |
| HandsActions |
| HandsPlayers |
| HudCache |
| Players |
| Settings |
| Sites |
| TourneyTypes |
| Tourneys |
| TourneysPlayers |
+-----------------+
13 rows in set (0.00 sec)
If that all works from the command line then mysql is configured correctly (NOTE: You may not have all the tables yet)
Try creating a dummy table:
mysql>CREATE TABLE example(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), age INT);
Query OK, 0 rows affected (0.01 sec)
If that works then its the fpdb config
My cheat sheet says that error 2003 is mysql not running. Check that by right clicking on My Computer, selecting manage, navigating to services and looking at mysql. If it is not running, you _should_ be able to start it there.
this message is not your problem:
quote
Exception exceptions.KeyError: KeyError(-1211377984,) in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored
/quote
Hey, thanks for the replies. The service is running, mentioned that earlier, but one thing is different now: I created the dummy table and on show tables nothing comes up, any ideas?
Lennart
sorry syntax error on my part it shows it fine
Ok, so everything with my MySQL seems fine, so lets tackle the config then, posts should be quoted earlier.
Thanks,
Lennart
mySQL config file: everything fine here?
quote
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=100
# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0
# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=18M
# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before. This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8
\quote
Sorry for the spam, but i have a feeling the problem might be the db_user argument as i cant recall having defined fpdb as a user anywhere, if that needs to be done, where can i do it.
All help appreciated,
Lennart
find HUD_config.xml
Look for:
<database db_name="fpdb" db_server="mysql" db_ip="localhost" db_user="fpdb" db_pass="YOUR MYSQL PASSWORD" db_type="fpdb">
Carl G
Just saw you already posted that previously - it looks right, you might have edited the wrong file.
There is a post or a page on the wiki that show the order the files are looked up.
I edited the HUD_config.xml in the pyfpdb folder, any suggestions on what i said about me not having created a user?
Thanks,
Lennart
take a look at the wiki here:
http://fpdb.wiki.sourceforge.net/Install+in+Windows
Try the mysql stuff near the top, where it is talking about Vista--it doesn't matter if you are not using vista. That should create an fpdb database and give a user named fpdb access to it.
If it starts blathering about having a database named fpdb, delete it using this statement:
DROP DATABASE fpdb;
and do Creat/Grant/Flush stuff again.
Did that when i started out yesterday, just redid it and still no change, i'm very confused...
Lennart
I will try rebooting and rechecking all MySQL things one more time, any other suggestions would be more than welcome.
Thank you,
Lennart
Hey again, I managed to get it up and running. I don't know why it wouldn't run on the ports i had set out but i changed them round to different ones and opened those aswell and now it works. Thanks to everyone who put in an effort to help me!
Regards,
Lennart
P.S.: Don't be happy yet, in a few hours I will probably come up with more problems :).