#mysql -uroot -p #show variables like '%char%'; mysql> create database sockets; mysql> SHOW DATABASES; mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON sockets.* TO sockets@mysql_zfl IDDENTIFIED BY 'zfl'; mysql> use sockets; Database changed mysql> CREATE TABLE socket1 (socket_id int(6) NOT NULL primary key, socket_name varchar(45) DEFAULT NULL, ice double(16,2), sell_price double(16,2), score double(16,2))ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.03 sec)
mysql> INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (000795,"英洛华",5.95,8.9,5,6.5,5,60); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002230,"科大讯飞",61.38,65.90,50.29,65.60,51.70,80); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (000725,"京东方",6.62,6.69,5.81,6.69,6.00,90); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (000002,"万科",39.10,39.10,20.92,40.10,35.59,90); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (603315,"福鞍股份",13.38,16.98,10.01,15.63,10.01,50); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002291,"星期六",7.10,10.21,6.15,5.49,6.99,70); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (601766,"中国中车",12.16,18.39,10.27,18.40,11.85,70); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (603711,"香飘飘",31.23,31.23,26.35,31.25,26.35,90); Query OK, 1 row affected (0.00 sec) INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (603321,"梅轮电梯",13.28,38.90,11.26,13.30,12.48,90); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (603277,"银都股份",19.05,35.86,17.25,19.10,17.25,90); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002606,"大连电瓷",11.13,27.23,11.10,13.10,11.10,300); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002899,"英派斯",29.09,49.53,26.10,29.90,10.10,30); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002194,"武汉凡谷",9.71,15.95,7.56,11.76,9.60,20); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (603880,"南卫股份",25.92,30.26,22.38,25.90,22.30,50); INSERT INTO socket1 (socket_id,socket_name,now_price,highest_price,lowest_price,buy_price,sell_price,score) VALUES (002885,"京泉华",35.18,31.26,33.95,33.20,50);