mysql -h localhost -u test -P 3306 -p
459 mysql -h 192.168.1.12 -u test_user2312 -P 3306 -p
LOAD DATA LOCAL INFILE '/home/hctest/load_41_10.txt' INTO TABLE t15 fields terminated by ',';
[root@localhost hctest]# cat uid_mysql.sh
#!/bin/sh
# id name age sex id_no addr dept job salary remark
#for i in {1..36000000}
for i in {1..2}
do
nowDate=$(date +'%Y-%m-%d %H:%M:%S')
echo $nowDate
tmp_idno=`date +%s%N | cut -c10-20`
echo $tmp_idno
uid=$(uuidgen)
#echo $uid
tmp_age=$((RANDOM%50+1))
echo $tmp_age
tmp_name=`echo $RANDOM |md5sum | cut -c6-13`
echo $tmp_name
#echo "$i,wo_51__$i,$tmp_age,1,$tmp_idno,NanJing0123,NanJing,small,sing,remark_$i" >> load_41_10.txt
echo "$uid,$i,222.12,2023-07-24,07:12:13,$nowDate,,f6,g7,h8,i9,j10,k11,l12,m13,n14,o15,p16,q17,r18,s19,t20,u21,v22,w23,x24,y25,z26,a27,b28,c29,d30,e31,f32,g33,h34" >> test_uid.txt
标签:tmp,uid,age,echo,导入,mysql,随笔,name From: https://www.cnblogs.com/shuimu2014/p/17958607