随笔分类 -  MYSQL

摘要:从目标库导出数据 C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqldump -uroot -p testdb_db > c:/testdb.dump 导入目标库 C:\Program Files\MySQL\MySQL Server 5.7\bin> 阅读全文
posted @ 2022-12-02 20:35 iDEAAM 阅读(93) 评论(0) 推荐(0) 编辑
摘要:#要列出用户 SELECT * FROM mysql.user; #创建用户 CREATE USER user1 IDENTIFIED BY '628803c'; #更改密码 ALTER USER user1IDENTIFIED WITH mysql_native_password BY '6288 阅读全文
posted @ 2022-10-27 15:06 iDEAAM 阅读(69) 评论(0) 推荐(0) 编辑
摘要:要在visual studio中使用entity framework for mysql 需要安装两个东西:1. mysql for visual studio 2. mysql-connector-net mysql 8.0.28(一定要用这个版本) 目前还不支持 visual studio 20 阅读全文
posted @ 2022-05-30 15:10 iDEAAM 阅读(235) 评论(0) 推荐(0) 编辑
摘要:mysql trigger 触发器的使用 注意前后加加 delimiter $$ .................... $$ delimiter ; #修改a.dealer 表信息时,更新b.dealer delimiter $$ CREATE TRIGGER syncInfoByUpdateA 阅读全文
posted @ 2022-03-30 01:47 iDEAAM 阅读(66) 评论(0) 推荐(0) 编辑
摘要:update 遇到 disable safe 使用 以下语句解决 阅读全文
posted @ 2018-07-04 17:49 iDEAAM 阅读(519) 评论(0) 推荐(0) 编辑
摘要:1. 安装Visual Studio 20132. 下载mysql,安装mysql。3. 下载 mysql-for-visualstudio-1.2.7.msi, 下载链接:https://cdn.mysql.com//Downloads/MySQL-for-VisualStudio/mysql-f 阅读全文
posted @ 2018-03-22 15:13 iDEAAM 阅读(379) 评论(0) 推荐(0) 编辑
摘要:use websitelogdb; #创建表 CREATE TABLE `test` ( `idtest` int(11) NOT NULL AUTO_INCREMENT, `testcol` varchar(45) DEFAULT NULL, `testcol1` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtest`) ) ENGINE... 阅读全文
posted @ 2018-01-15 10:56 iDEAAM 阅读(848) 评论(0) 推荐(0) 编辑
摘要:var param = new MySqlParameter("@" + columName, property.Value); param.DbType = DbType.String; 阅读全文
posted @ 2018-01-08 15:39 iDEAAM 阅读(472) 评论(0) 推荐(0) 编辑
摘要:[TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { using (testEntities entity = new testEntities()) { var tableName = "test 阅读全文
posted @ 2017-12-11 15:44 iDEAAM 阅读(975) 评论(0) 推荐(0) 编辑
摘要:mysql -uroot -e "SELECT concat('ALTER TABLE ', TABLE_NAME,' ENGINE=MYISAM;') FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'jitamin2' AND ENGINE = 'InnoDB' AND TABLE_TYPE = 'BASE TABLE'" 阅读全文
posted @ 2017-03-29 18:24 iDEAAM 阅读(1711) 评论(0) 推荐(0) 编辑
摘要:1. 登陆mysql 2. use testdb 3. 执行导入语句 出现乱码的解决办法: 阅读全文
posted @ 2017-01-17 20:09 iDEAAM 阅读(4563) 评论(0) 推荐(0) 编辑
摘要:错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 原因: 同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的 阅读全文
posted @ 2017-01-15 15:24 iDEAAM 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Entity Framework连接MySQL时:由于出现以下异常,无法生成模型:“表“TableDetails”中列“IsPrimaryKey”的值为DBNull. 解决方案: Execute the following commands in MySQL. use <<database name 阅读全文
posted @ 2016-07-05 13:22 iDEAAM 阅读(2881) 评论(0) 推荐(0) 编辑
摘要:AWS RDS AWS上搭建数据库的时候,不是DB on EC2就是RDS,但是选择RDS时,Timezone怎么处理? 「面向全球提供的AWS来讲理所当然的是UTC」,而RDS也不是例外。把服务器迁移到AWS时,「数据库能不能使用中国时间」是常见的一个问题。 DB on EC2的话,配置一下系统的 阅读全文
posted @ 2016-05-23 14:06 iDEAAM 阅读(2375) 评论(1) 推荐(0) 编辑
摘要:一. 怎么更改数据库data存储目录: 1. 安装MYSQL。 2. 切换到 C:\Program Files\MySQL\MySQL Server 5.6 3. 新建my.ini. 加入如下配置:(默认mysqlservice 的 my.ini 是在 C:\ProgramData\MySQL\My 阅读全文
posted @ 2016-04-08 15:52 iDEAAM 阅读(1421) 评论(0) 推荐(0) 编辑
摘要:Mysql中假如有 ID Int auto_increment, CID varchar(36). 通常情况下都是 ID设置为主键。 假如要设置CID为主键。自增列ID必需是唯一索引。 阅读全文
posted @ 2016-03-31 11:52 iDEAAM 阅读(1402) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示