praveen97uma / mycheckpoint

Automatically exported from code.google.com/p/mycheckpoint
0 stars 1 forks source link

Does mycheckpoint work with MariaDB 5.2.x MySQL ? #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi I tried to install mycheckpoint via rpm but getting an error. I use MariaDB 
5.2.x with yum exclude for mysql, so manually compiled MySQL-python but not 
getting any where ?

* CentOS 6.0 64bit
* MariaDB 5.2.10 64bit
* Python 2.7.2

Server version          5.2.10-MariaDB-mariadb107
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 1 day 3 hours 49 min 9 sec

Threads: 1  Questions: 7  Slow queries: 0  Opens: 15  Flush tables: 1  Open 
tables: 8  Queries per second avg: 0.0

which python
alias python='/opt/python2.7.2/bin/python'
        /opt/python2.7.2/bin/python

mycheckpoint --help
Traceback (most recent call last):
  File "/usr/local/bin/mycheckpoint", line 22, in <module>
    import MySQLdb
ImportError: No module named MySQLdb

MySQL-python install
wget 
http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-pyth
on-1.2.3.tar.gz/download
tar xvzf MySQL-python-1.2.3.tar.gz 
cd MySQL-python-1.2.3
/opt/python2.7.2/bin/python setup.py build
/opt/python2.7.2/bin/python setup.py install

output

#######################
[root@host MySQL-python-1.2.3]# /opt/python2.7.2/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> 
build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 
-I/usr/include/mysql -I/opt/python2.7.2/include/python2.7 -c _mysql.c -o 
build/temp.linux-x86_64-2.7/_mysql.o -fno-omit-frame-pointer -g -pipe 
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 
-DUNIV_LINUX
In file included from _mysql.c:36:
/usr/include/mysql/my_config.h:1217:1: warning: "HAVE_WCSCOLL" redefined
In file included from /opt/python2.7.2/include/python2.7/Python.h:8,
                 from pymemcompat.h:10,
                 from _mysql.c:29:
/opt/python2.7.2/include/python2.7/pyconfig.h:887:1: warning: this is the 
location of the previous definition
gcc -pthread -shared build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib64/mysql 
-L/opt/python2.7.2/lib -lmysqlclient_r -lz -lnsl -lrt -lresolv -lpthread 
-lcrypt -lnsl -lm -lpthread -lrt -lpython2.7 -o 
build/lib.linux-x86_64-2.7/_mysql.so

#######################
[root@host MySQL-python-1.2.3]# /opt/python2.7.2/bin/python setup.py install
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
running build_ext
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/MySQLdb/times.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/MySQLdb/connections.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/MySQLdb/cursors.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/MySQLdb/converters.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
creating build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/CLIENT.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/FIELD_TYPE.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/FLAG.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/REFRESH.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/CR.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/__init__.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/constants/ER.py -> 
build/bdist.linux-x86_64/egg/MySQLdb/constants
copying build/lib.linux-x86_64-2.7/MySQLdb/__init__.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/MySQLdb/release.py -> 
build/bdist.linux-x86_64/egg/MySQLdb
copying build/lib.linux-x86_64-2.7/_mysql_exceptions.py -> 
build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_mysql.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/times.py to times.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/connections.py to 
connections.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/converters.py to 
converters.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/CLIENT.py to 
CLIENT.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/FIELD_TYPE.py to 
FIELD_TYPE.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/FLAG.py to 
FLAG.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/REFRESH.py to 
REFRESH.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/__init__.py to 
__init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/constants/ER.py to ER.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.linux-x86_64/egg/_mysql_exceptions.py to 
_mysql_exceptions.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.linux-x86_64/egg/_mysql.py to _mysql.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -> 
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/MySQL_python-1.2.3-py2.7-linux-x86_64.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing MySQL_python-1.2.3-py2.7-linux-x86_64.egg
Removing 
/opt/python2.7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_
64.egg
Copying MySQL_python-1.2.3-py2.7-linux-x86_64.egg to 
/opt/python2.7.2/lib/python2.7/site-packages
MySQL-python 1.2.3 is already the active version in easy-install.pth

Installed 
/opt/python2.7.2/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_
64.egg
Processing dependencies for MySQL-python==1.2.3
Finished processing dependencies for MySQL-python==1.2.3

Original issue reported on code.google.com by eva2...@gmail.com on 18 Dec 2011 at 9:17

GoogleCodeExporter commented 9 years ago
I believe the question is not whether mycehckpoint works with MariaDB, but 
rather how to make it work with mysql-python, am I correct?

I'm not sure about the process by which you installed mysql-python.
What happens when you do:

bash$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> 

Do you get an error? If so, then mysqldb is not properly installed.

Original comment by shlomi.n...@gmail.com on 18 Dec 2011 at 9:54

GoogleCodeExporter commented 9 years ago
no errors

python
Python 2.7.2 (default, Dec 13 2011, 07:52:04) 
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>

Original comment by eva2...@gmail.com on 18 Dec 2011 at 4:17

GoogleCodeExporter commented 9 years ago
Hmmm... I'm a bit at a loss here. So direct python command line recognizes 
MySQLdb, but mycheckpoint does not?
I would create a testing script, which tries to import MySQLdb; place it on 
same location as mycheckpoint. Does it work?

Original comment by shlomi.n...@gmail.com on 18 Dec 2011 at 5:24