mysql
blog_zxb
这个作者很懒,什么都没留下…
展开
-
mysql 修改表或表结构
一、批量修改表名的sql语句alter table old_name rename new_name; --修改表名alter table test add column add_col_name varchar(10); --添加表列alter table test drop column del_col_name; --删除表列alter table test modify col_name varchar(10) --修改表列类型alter table test change原创 2020-07-22 11:53:25 · 184 阅读 · 0 评论 -
mysql密码和权限配置
mysql创建一个用户并配置权限前提条件:登录到mysql格式 :grant <privileges> on <database>.<table> to <user>@<host> identified by <password> [with grant option]参数解释:privileges:表示要给这...原创 2020-04-18 14:17:26 · 278 阅读 · 0 评论 -
Springboot 使用 Logback 自动同步指定级别日志到 Mysql 数据库
https://github.com/xiaobingzhou/log-db原创 2020-03-26 16:46:26 · 330 阅读 · 0 评论 -
Centos7通过yum安装最新MySQL
一:去官网查看最新安装包https://dev.mysql.com/downloads/repo/yum/二:下载MySQL源安装包wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm安装MySql源yum -y install mysql57-community-release-...转载 2020-03-23 15:50:45 · 140 阅读 · 0 评论 -
centos install mysql5.7
# 查找linux自带的数据库rpm -qa | grep mariadb#删除自带的数据库 mariadbrpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64#依次安装rpm -ivh mysql-community-common-5.7.24-1.el7.x86_64.rpmrpm -ivh mysql-community-libs...原创 2020-03-23 14:13:58 · 197 阅读 · 0 评论 -
使用docker配置mysql主从复制
MySQL主从配置1、准备工作ps: centos7 install docker# 准备两个mysql服务# 使用docker拉取mysql:5.7镜像$ docker pull mysql:5.72、配置master配置文件# 将mysql1配置为mysql的master,在/opt/mysql/conf1添加一个mysqld.cnf配置文件$ vi /opt/m...原创 2019-12-31 11:39:10 · 150 阅读 · 1 评论 -
mysql5.7之后使用 group by 会出现 only_full_group_by
mysql5.7之后使用 group by 会出现 only_full_group_by### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause a...原创 2019-12-27 19:15:11 · 148 阅读 · 0 评论 -
java使用Calendar类生成时间保存到mysql数据库后时间多了一秒
java使用Calendar类生成时间保存到mysql数据库后时间多了一秒@Testpublic void testCalendar() { Calendar calendar = Calendar.getInstance(); calendar.set(2019, 3, 29, 17, 33, 33); Date time = calendar.getTime(); System...原创 2019-04-29 17:44:08 · 1677 阅读 · 1 评论