Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

How to set the custom configuration(username&password) of MYSQL for running swarm #2794

Closed
victaie opened this issue Dec 7, 2015 · 6 comments

Comments

@victaie
Copy link

victaie commented Dec 7, 2015

Hi,
I have installed successfully the nupic from the binary file on our server(not from the source code), and the swarm process need the mysql (which already installed with the custom username and password)to fire up. How can I set the custom configuration(username&password)of mysql for running swarm?

I have tried the nupic-default.xml and nupic-site.xml, but it didn't work for me :(

Thanks

@victaie victaie changed the title How to set the custom configuration(username&password) of the database for running swarm How to set the custom configuration(username&password) of MYSQL for running swarm Dec 7, 2015
@rhyolight
Copy link
Member

@aoman89757 You saw this, right? https://github.com/numenta/nupic/wiki/MySQL-Settings

@rhyolight
Copy link
Member

Remember you need to set a $NUPIC environment variable and place the config file relative to that location since you don't have the source code checked out...

@victaie
Copy link
Author

victaie commented Dec 15, 2015

@rhyolight I did follow this tutorial, but the result is always the same:
Retrieved the following settings from NuPIC configuration:
host : localhost
port : 3306
user : root
passwd :

@rhyolight
Copy link
Member

What happens when you run the following command?

cat ${NUPIC}/config/default/nupic-site.xml

If you don't have that file, create it and override the values you want:

<property>
  <name>nupic.cluster.database.user</name>
  <value>YOUR-USERNAME</value>
  <description>Username for the MySQL database server </description>
</property>

<property>
  <name>nupic.cluster.database.passwd</name>
  <value>YOUR-PASSWORD</value>
  <description>Password for the MySQL database server </description>
</property>

@victaie
Copy link
Author

victaie commented Dec 21, 2015

I did create that file, but I got the error test result(besides, the directory of the nupic-site.xml file is different $NUPIC/src/nupic/support/nupic-default.xml ? ${NUPIC}/config/default/nupic-site.xml? ):

This script will validate that your MySQL is setup correctly for NuPIC.
MySQL is required for NuPIC swarming. The settings are defined in a
configuration file found in $NUPIC/src/nupic/support/nupic-default.xml
Out of the box those settings contain MySQL's default access
credentials.

The nupic-default.xml can be duplicated to define user specific changes,
calling the copied file $NUPIC/src/nupic/support/nupic-site.xml
Refer to the nupic-default.xml for additional instructions.

Defaults: localhost, 3306, root, no password

Retrieved the following settings from NuPIC configuration:
host : localhost
port : 3306
user : root
passwd :

Traceback (most recent call last):
File "test_db.py", line 54, in
raise RuntimeError("Couldn't connect to the database."
RuntimeError: Couldn't connect to the database. Please ensure you have MySQL
installed, running, and accessible using the NuPIC configuration settings.

@rhyolight
Copy link
Member

Ok I think I got the path wrong. Wherever the nupic-default.xml file is, you should put your own nupic-site.xml file in the same directory. Copy the exact format of nupic-default.xml and replace the MySQL authentication values.

Are you certain that MySQL is actually running?

@victaie victaie closed this as completed Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants