1. 在linux机器上,进入mysql环境:
mysql -h 10.255.254.22 -u readuser -p password;
mysql -h 10.255.254.22 -u writeuser -p password
2. 查看该机器上有哪些数据库:
show databases;
3. 切换到某数据库:
use prodviewdb;
4. 查看当前数据库中都有哪些表:
show tables;
5. 查看表结构:
desc area_coupon_code;
6. 对具体的表进行操作:
(1) 查询操作: select * from search_v3_view where product_id in (1000270800,1000271500);
select product_name,product_id,area_coupon_data_info from search_v3_view where product_id in (1000270800,1000271500);
(2)修改操作: update search_v3_view set search_v3_view.product_type=6,search_v3_view.product_medium=33 where product_id=5
(3)插入操作:
阅读(241) | 评论(0) | 转发(0) |