I’m trying to install CVSAnaly2, which its installation and run are explained in the link https://sites.google.com/site/arnamoyswebsite/Welcome/updates-news/howtoinstallandruncvsanaly2inubuntu1110.
But, when I try to run the command cvsanaly2 -u root -p ****, I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/cvsanaly2", line 5, in <module>
pkg_resources.run_script('cvsanaly2==2.1.0', 'cvsanaly2')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/cvsanaly2-2.1.0-py2.7.egg/EGG-INFO/scripts/cvsanaly2", line 37, in <module>
retval = pycvsanaly2.main.main (sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/cvsanaly2-2.1.0-py2.7.egg/pycvsanaly2/main.py", line 265, in main
config.db_hostname)
File "/usr/local/lib/python2.7/dist-packages/cvsanaly2-2.1.0-py2.7.egg/pycvsanaly2/Database.py", line 604, in create_database
db.connect ().close ()
File "/usr/local/lib/python2.7/dist-packages/cvsanaly2-2.1.0-py2.7.egg/pycvsanaly2/Database.py", line 473, in connect
raise DatabaseException (str (e))
pycvsanaly2.Database.DatabaseException: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
Any one has any idea how to fix this error ?
Thanks
In the above link, it is mentioned that to install Python MySqldb, we need to use “sudo apt-get install python-mysqldb” command. However, it is not mentioned that we need first to install MySql Server before installing python-mysqldb.
So, I removed python mysql using “sudo apt-get install python-mysqldb”. Then,I followed these steps to make it work.
1) Install MySql Server with “sudo apt-get install mysql-server” command
2) Install python MySql with “sudo apt-get install python-mysqldb” command
And, it worked 🙂