numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.33k stars 1.55k forks source link

I can't run a swarm with mysql 5.7.16 #3398

Closed paulsheehan closed 8 years ago

paulsheehan commented 8 years ago

Hi. I have been trying to perform a Nupic swarm for the last 2 weeks. Running hotgym.py located at the path "/nupic/examples/opf/clients/hotgym/simple" works perfectly fine. Nupic is installed, and runs perfectly fine. I have installed mysql 5.7.16 and that works too. I can create new databases, tables, users, even update my passwords for users. I cannot, however, set a blank password for mysql no matter how many times I reinstall it. When I run the swarm.py file at the path "~/nupic/examples/opf/clients/hotgym/prediction/one_gym$" I get the exception below:

2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e)) OperationalError: (2003, 'Can\'t connect to MySQL server on \'localhost\' ((1045, u"Access denied for user \'root\'@\'localhost\' (using password: NO)"))')

I have a password set for root user @ localhost, which I specify in the nupic-default.xml file located at the path ":~/nupic/src/nupic/support$"

I am running out of solutions here. Could it be that I have to downgrade to a older version of mysql where the password column is called 'Password', instead of 'authentication_string'?

Also: When I go into the mysql shell and describe my user table my authentication_string's "NULL" value is set to yes.

Basically I get the same exception no matther what value I set as the password in nupic-default.xml.

Any help?

rhyolight commented 8 years ago

Thanks for the report. What operating system are you using?

paulsheehan commented 8 years ago

I'm using Ubuntu 16.04.1 LTS.

vitaly-krugl commented 8 years ago

Does this help: #3189? Look for NTA_CONF_PATH there under "Additional information".

simonalabaster commented 8 years ago

A workaround for you: sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables & Then try the swarm in another terminal.

paulsheehan commented 8 years ago

Yes, simonalabaster your workaround resolved the issue and I can now run swarms! Thank's for the help guys, I can now move on with my project. Apologies for the delay in response I was working on some other high priority tasks over the weekend and couldn't check your solutions. Great stuff. Thanks.

tjdurant commented 7 years ago

Hello, thought I would leave a comment here rather than opening my own post. It was a question, but I ended up just using the workaround submitted by @simonalabaster but for CentOS:

I was running into a similar problem with CentOS 7 when I try to run swarm.py from:

https://github.com/numenta/nupic/blob/master/examples/opf/clients/hotgym/prediction/one_gym/swarm.py

The error I got:

"Can't connect to MySQL server on %r (%s)" % (self.host, e)) OperationalError: (2003, 'Can\'t connect to MySQL server on \'localhost\' ((1045, u"Access denied for user \'root\'@\'localhost\' (using password: NO)"))')

I am unable to set the MySQL password to blank.

Since the Ubuntu workaround isn't compatible with CentOS, if future users encounter the same problem, you can do the following commands which were found here: https://stackoverflow.com/questions/33510184/change-mysql-root-password-on-centos7

systemctl stop mysqld systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" systemctl start mysqld