添加前缀update `ecs_goods` set goods_name=concat('新中式',goods_name) where cat_id =4;
添加后缀update `ecs_goods` set goods_name=concat(goods_name,'新中式') where cat_id =4;
删除
update `ecs_goods`set goods_name=right(goods_name,length(goods_name)-1) where cat_id =4;
其中ecs_goods为表名,cat_id为分类字段名,goods_name为产品字段名
UPDATE tab_media SET file_path=CONCAT('/upload/file/1/video/20141219/',tm_id,'.mp4') WHERE media_type=1;
增加远程登录:
mysql>use mysql;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; //为root添加远程连接的能力
mysql> update user set Password = password('dsideal') where User='root'; //设置root用户密码
mysql> flush privileges;
mysql> exit