#创建表,添加自动更新时间字段
CREATE TABLE `windows` (
`item` varchar(255) DEFAULT NULL,
`updatetime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) #######ENGINE=InnoDB DEFAULT CHARSET=gbk;


#添加列
alter table windows add column value decimal(16,2) not null;
#添加自增长列
alter table windows add id int auto_increment primary key

 

#新建用户并授予相应权限
create user 'monitoruser'@'%' identified by 'EW.3!9zep5j';
grant select,insert,update,delete,create on monitor_data.* to monitoruser;
flush privileges;

 

相关文章:

  • 2021-11-30
  • 2021-08-02
  • 2021-11-07
  • 2021-09-20
  • 2021-11-14
  • 2022-12-23
  • 2021-06-27
  • 2021-09-28
猜你喜欢
  • 2022-01-06
  • 2021-07-01
  • 2021-06-14
  • 2022-01-20
  • 2022-01-18
  • 2021-06-03
  • 2022-12-23
相关资源
相似解决方案