TPCH

【产品名称】oceanbase-cs

【产品版本】3.1

【问题描述】

做TPC-H_Tools_v3.0.0.zip测试的加载数据部分报错了。

python load.py

mysql --default-auth=mysql_native_password,db_name -h10.11.253.44 -P2883 -utpch@test -c -A tpch_10g_part -e “show tables;”

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

mysql --default-auth=mysql_native_password,db_name -h10.11.253.44 -P2883 -utpch@test -c -A tpch_10g_part -e “load data /*+ parallel(8) */ infile ‘/usr/tpch/TPC-H_Tools_v3.0.0/dbgen/tpch10/customer.tbl’ into table customer fields terminated by ‘|’;”

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

(256, “ERROR 2059 (HY000): Authentication plugin ‘mysql_native_password,db_name’ cannot be loaded: /usr/lib64/mysql/plugin/mysql_native_password,db_name.so: cannot open shared object file: No such file or directory”)

ll

total 12

-rw-r--r-- 1 root root 3814 Mar 17 20:33 dss.ddl

-rw-r--r-- 1 root root 2072 Mar 17 20:33 dss.ri

-rw-r--r-- 1 root root 2838 Mar 17 20:56 load.py

[root@observer4 load]# cat load.py

#/usr/bin/evn python

#-*- encoding:utf-8 -*-

import os

import sys

import time

import commands

hostname='10.11.253.44'

port='2883'

tenant='test'

user='tpch'

password='123456'

data_path='/usr/tpch/TPC-H_Tools_v3.0.0/dbgen/tpch10'

db_name='tpch_10g_part'

cmd_str='mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s  -c -A %s -e "show tables;" '%(hostname,port,user,tenant,db_name)

print cmd_str

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/customer.tbl' into table customer fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

print cmd_str

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/lineitem.tbl' into table lineitem fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/nation.tbl' into table nation fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/orders.tbl' into table orders fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/partsupp.tbl' into table partsupp fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/part.tbl' into table part fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/region.tbl' into table region fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)

result = commands.getstatusoutput(cmd_str)

print result

cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8) */ infile '%s/supplier.tbl' into table supplier fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)


mysql -h10.11.253.44 -P 2883 -uroot@test#obproxy -p -c -A mysql



mysql> SELECT Host,User,Password,plugin from user;

+------+------------+-------------------------------------------+--------------------+

| Host | User      | Password                                 | plugin            |

+------+------------+-------------------------------------------+--------------------+

| %   | root      |                                          | ob_native_password |

| %   | ORAAUDITOR | *9753e2cf9d2dcd5e13c052f581c310ac70c62723 | ob_native_password |

| %   | u_sysbench | *6bb4837eb74329105ee4568dda7dc67ed2ca2ad9 | ob_native_password |

| %   | tpcc      | *6bb4837eb74329105ee4568dda7dc67ed2ca2ad9 | ob_native_password |

| %   | tpch      | *6bb4837eb74329105ee4568dda7dc67ed2ca2ad9 | ob_native_password |

+------+------------+-------------------------------------------+--------------------+

5 rows in set (0.19 sec)