mayvb 2018-06-14 12:41 采纳率: 0%
浏览 1356
已结题

在MySQL中安装sqljieba插件的时候报错

在mysql中安装sqljieba插件的时候报错

sudo cp libsqljieba.so /usr/lib/mysql/plugin
sudo cp -r ./dict /usr/share

安装错误

install plugin sqljieba soname 'libsqljieba.so';
ERROR 2013 (HY000): Lost connection to MySQL server during query

查看插件路径下是有的
+------------------------+
| @@plugin_dir |
+------------------------+
| /usr/lib/mysql/plugin/ |
+------------------------+
c@PC:/usr/lib/mysql/plugin$ ll
总用量 792
drwxr-xr-x 2 root root 4096 6月 14 13:40 ./
drwxr-xr-x 3 root root 4096 6月 14 13:40 ../
-rw-r--r-- 1 root root 21224 4月 20 19:52 adt_null.so
-rw-r--r-- 1 root root 6288 4月 20 19:52 auth_socket.so
-rw-r--r-- 1 root root 44144 4月 20 19:52 connection_control.so
-rw-r--r-- 1 root root 108696 4月 20 19:52 innodb_engine.so
-rw-r--r-- 1 root root 88608 4月 20 19:52 keyring_file.so
-rw-r--r-- 1 root root 154592 4月 20 19:52 libmemcached.so
-rwxr-xr-x 1 root root 141592 6月 14 02:20 libsqljieba.so

后来查看日志 发现在执行指令的时候程序抛出异常了 在读取 /usr/share/dict/jieba.dict.utf8报错了

查看错误日志文件 vim /var/log/mysql/error.log

2018-06-14 14:37:01 ./deps/cppjieba/DictTrie.hpp:153 FATAL exp: [ifs.is_open()] false. open /usr/share/dict/jieba.dict.utf8 failed.
06:37:01 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 76387 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f8b0c000ae0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f8b2c125e70 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xe907ab]
/usr/sbin/mysqld(handle_fatal_signal+0x489)[0x789b49]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f8b45a80390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f8b44e39428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f8b44e3b02a]
/usr/lib/mysql/plugin/libsqljieba.so(_ZN6limonp6LoggerD1Ev+0xf5)[0x7f8b245e6495]
/usr/lib/mysql/plugin/libsqljieba.so(_ZN8cppjieba8DictTrie8LoadDictERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x716)[0x7f8b245eecb6]
/usr/lib/mysql/plugin/libsqljieba.so(+0x7ce5)[0x7f8b245e4ce5]
/usr/sbin/mysqld[0xc707f4]
/usr/sbin/mysqld[0xc76b0a]
/usr/sbin/mysqld(_ZN22Sql_cmd_install_plugin7executeEP3THD+0x1a)[0xc76d9a]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THDb+0x24de)[0xc4e29e]
/usr/sbin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x3ad)[0xc52b3d]
/usr/sbin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x102a)[0xc53c7a]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x1c7)[0xc55137]
/usr/sbin/mysqld(handle_connection+0x288)[0xd16788]
/usr/sbin/mysqld(pfs_spawn_thread+0x1b4)[0xec9294]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f8b45a766ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f8b44f0b41d]

最后确认一下 /usr/share/dict/jieba.dict.utf8文件时存在的 并且权限也是OK的

pc@PC:/usr/share/dict$ ll
总用量 11356
drwxr-xr-x 3 mysql mysql 4096 6月 14 02:20 ./
drwxr-xr-x 111 root root 4096 6月 14 13:40 ../
-rw-r--r-- 1 mysql mysql 519739 6月 14 13:43 hmm_model.utf8
-rw-r--r-- 1 mysql mysql 5998717 6月 14 13:43 idf.utf8
-rw-r--r-- 1 mysql mysql 5071204 6月 14 13:43 jieba.dict.utf8
drwxr-xr-x 2 mysql mysql 4096 6月 14 02:20 pos_dict/
-rw-r--r-- 1 mysql mysql 683 6月 14 13:43 README.md
-rw-r--r-- 1 mysql mysql 8974 6月 14 13:43 stop_words.utf8
-rw-r--r-- 1 mysql mysql 49 6月 14 13:43 user.dict.utf8

  • 写回答

1条回答

  • threenewbee 2018-06-14 14:12
    关注

    可能还是你编码摄制的问题,建议你看下官方文档,https://github.com/yanyiwu/sqljieba 如果还不行,你直接问下作者。

    评论

报告相同问题?

悬赏问题

  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3