mysql主从同步失败.错误日志如下. Column 1 of table 'xxx' cannot be converted from type 'varchar(33)' to type 'varchar(11)' 这个我的机器的问题是数据库的字符集问题, 首先关闭从 ① stop slave: ② 执行修改语句. ③ start slave:…
解决mysql Table 'xxx' is marked as crashed and should be repaired的问题. 某个表在进行数据插入和更新时突然出现Table 'xxx' is marked as crashed and should be repaired这个异常,随后整个表无法查询,表数据全部丢失. 解决办法: 切换至mysql bin目录 ./myisamchk -c -r 数据库表MYI文件的路径 例如:./myisamchk -c -r /home/mysql/…
MySQL很强大,支持直接拷贝数据库文件快速备份,那数据库文件在哪里呢? 打开MySQL的配置文件 my.ini,找到 datadir 节点,如 datadir="D:/Program Files/MySQL/MySQL Server 5.1/data" 进入上述文件夹,就可以看到MySQL中新建的数据库文件夹了,每个文件夹以数据库名命名的,你想备份哪个数据库,把这个文件夹拷贝走即可.到时还原数据库,把它拷贝到data目录下即可,就这么简单! 但是,今天在一台MySQL服务器上拷贝备份…
create table xxx )       | NO   | PRI | NULL    | auto_increment | | Name       | varchar() | NO   |     | NULL    |                | | Age        | )       | NO   |     |        |                | | updatetime | datetime     | YES  |     | NULL    |…
使用Phalcon开发工具,通过命令行生成程序框架 设置好config.php,在对数据库进行读取.保存数据的时候出现了问题“Table 'XXX' doesn't exist in database when dumping meta-data for XXX” 注意到上方还有一条语句“Array to string conversion”,找到对应services.php处的代码 $di->set('db', function () use ($config) { return new Db…
  今天遇到一个关于MySQL求助的问题,修改表结构时遇到"ERROR 1050 (42S01): table xxx already exits" mysql> ALTER TABLE DAY_BOOK_REPORT  ADD UNIT_PRICE_PCS   DOUBLE(12,2) DEFAULT NULL; ERROR 1050 (42S01): TABLE 'INVGSP/#SQL-IB379' ALREADY EXISTS mysql> 检查了后,发现表DAY_…
Add a Column to a table if not exists MySQL allows you to create a table if it does not exist, but does not provide a native way of a adding a column (i.e. a field) to an existing table with a test of whether the column already exists - so as to avoi…
1.执行sql语句报上面的错误: DELETE FROM db_student WHERE RowGuid IN ( SELECT RowGuid FROM db_student WHERE age = GROUP BY RowGuid HAVING count( * ) > ) AND ID NOT IN ( SELECT MAX( ID ) AS id FROM db_student WHERE age = GROUP BY RowGuid HAVING count( * ) > ) 报错…
原文:SQL logic error or missing database no such table: xxx System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing database no such table: xxx 错误原因:在连接数据库时,数据库文件没有使用绝对路径: new SQLiteConnection("Data Source=xxx.sqlite;Version=3;"…
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'xxx.hibernate_sequence' doesn't exist 背景: springboot 1.5.9.RELEASE 升级至 2.0.5.RELEASE时,spring-boot-starter-data-jpa使用了hibernate5: 解决方法: spring.jpa.hibernate.use-new-id-genera…