In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
An error was reported when installing MySQLmtop today. It was found that the MySQLdb module of python was not installed. Manual operation reported the following error:
[root@test1 mysqlmtop] # python
Python 2.6.6 (r266 84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> import MySQLdb
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 19, in
File "build/bdist.linux-x86_64/egg/_mysql.py", line 7, in
File "build/bdist.linux-x86_64/egg/_mysql.py", line 6, in _ _ bootstrap__
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
> quit
Use quit () or Ctrl-D (i.e. EOF) to exit
> > >
Solution:
Root@test1 mysqlmtop] # ln-s / usr/local/mysql/lib/libmysqlclient.so.18 / usr/lib64/
[root@test1 mysqlmtop] #
Run the test again:
[root@test1 mysqlmtop] # python
Python 2.6.6 (r266 84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> import MySQLdb
> > >
> conn= MySQLdb.connect
... Host='172.16.16.14'
... Port = 3306
... User='root'
... Passwd='123456'
... Db = 'test'
.)
> > cur = conn.cursor ()
> > >
> cur.execute ("select * from chenfeng")
3L
> > >
> > result = cur.fetchall ()
> print result
(('aaaa',), (' bbbb',), ('bbbb',))
> > >
> > >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.