我在使用 MySQL 时遇到问题。我最近需要重建我的电脑,因为我感染了病毒。重建的一切都很顺利,但我很难让 MySQL 自行运行。我的数据库的配置文件与以前完全相同,但我遇到了一个问题,即某些表在重新启动 MySQL 后消失了。
这是错误日志中的一段,我认为它详细说明了这个问题:
2014-03-06T21:02:13.043598Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld: ready for connections.
Version: '5.7.3-m13-log' socket: '' port: 3306 MySQL Community Server (GPL)
2014-03-06T21:02:33.191623Z 5 [ERROR] InnoDB: Failed to find tablespace for table "testschema_testwithunderscore"."testtable_withunderscore" in the cache. Attempting to load the tablespace with space id 57.
2014-03-06 16:02:33 0x1d64 InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.
2014-03-06T21:02:33.194622Z 5 [ERROR] InnoDB: Could not find a valid tablespace file for 'testschema_testwithunderscore/testtable_withunderscore'. See http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:34 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:39 0x1d9c InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
我之前曾发布过这个问题,但似乎没有人完全理解我的问题。为了更容易理解问题,请观看this video向我展示了创建测试模式和测试表,重新启动数据库,然后看着它消失。我打开的文件夹是 MySQL 服务器的 ProgramData 文件夹。 作为旁注,当我将 lower_case_table_names 设置为 1 时,这种消失表的奇怪行为不会发生。我希望能够像过去一样在我的表名中使用大写字符。
最佳答案
这个问题已经解决了一段时间了,但是直到今天我才忘记这个问题,所以我会回来回答。显然我安装的 MySQL 服务器在某种程度上已经损坏,重新安装服务器解决了问题。
关于MySQL 表消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22236283/
文章目录一、概述简介原理模块二、配置Mysql使用版本环境要求1.操作系统2.mysql要求三、配置canal-server离线下载在线下载上传解压修改配置单机配置集群配置分库分表配置1.修改全局配置2.实例配置垂直分库水平分库3.修改group-instance.xml4.启动监听四、配置canal-adapter1修改启动配置2配置映射文件3启动ES数据同步查询所有订阅同步数据同步开关启动4.验证五、配置canal-admin一、概述简介canal是Alibaba旗下的一款开源项目,Java开发。基于数据库增量日志解析,提供增量数据订阅&消费。Git地址:https://github.co
了解Rails缓存如何工作的人可以真正帮助我。这是嵌套在Rails::Initializer.runblock中的代码:config.after_initializedoSomeClass.const_set'SOME_CONST','SOME_VAL'end现在,如果我运行script/server并发出请求,一切都很好。然而,在我的Rails应用程序的第二个请求中,一切都因单元化常量错误而变得糟糕。在生产模式下,我可以成功发出第二个请求,这意味着常量仍然存在。我已通过将以上内容更改为以下内容来解决问题:config.after_initializedorequire'some_cl
我看到其他人也遇到过类似的问题,但没有一个解决方案对我有用。0.3.14gem与其他gem文件一起存在。我已经完全按照此处指示完成了所有操作:https://github.com/brianmario/mysql2.我仍然得到以下信息。我不知道为什么安装程序指示它找不到include目录,因为我已经检查过它存在。thread.h文件存在,但不在ruby目录中。相反,它在这里:C:\RailsInstaller\DevKit\lib\perl5\5.8\msys\CORE\我正在运行Windows7并尝试在Aptana3中构建我的Rails项目。我的Ruby是1.9.3。$gemin
我已经开始使用mysql2gem。我试图弄清楚一些基本的事情——其中之一是如何明确地执行事务(对于批处理操作,比如多个INSERT/UPDATE查询)。在旧的ruby-mysql中,这是我的方法:client=Mysql.real_connect(...)inserts=["INSERTINTO...","UPDATE..WHEREid=..",#etc]client.autocommit(false)inserts.eachdo|ins|beginclient.query(ins)rescue#handleerrorsorabortentirelyendendclient.commi
我正在尝试绕过rails配置这个极其复杂的迷宫。到目前为止,我设法在ubuntu上设置了rvm(出于某种原因,ruby在ubuntu存储库中已经过时了)。我设法建立了一个Rails项目。我希望我的测试项目使用mysql而不是mysqlite。当我尝试“rakedb:migrate”时,出现错误:“!!!缺少mysql2gem。将其添加到您的Gemfile:gem'mysql2'”当我尝试“geminstallmysql”时,出现错误,告诉我需要为安装命令提供参数。但是,参数列表很大,我不知道该选择哪些。如何通过在ubuntu上运行的rvm和mysql获取rails3?谢谢。
目录1、yum安装mysql修改密码(1)在mysql里面修改(2)第二种方式,利用mysqladmin修改密码2、没有密码,登录mysql修改密码3、mysql的安全设置1、yum安装mysql在CentOS中默认安装有MariaDB(MySQL的一个分支),安装完成之后可以直接覆盖MariaDB。rpm-qa|grepmariadb查询是否安装了mariadbrpm-e--nodepsmariadb-libs-5.5.60-1.el7_5.x86_64卸载mariadwgethttp://dev.mysql.com/get/mysql57-community-release-el7-11.
我是Ruby的新手。我安装了DataMapper并且正在尝试安装dm-mysql-adapter-1.0.2gem。但是当我尝试安装时,出现以下错误。我正在使用ubuntu操作系统。vinoth@vinoth-laptop:~/Downloads$geminstalldm-mysql-adapter-1.0.2----with-mysql-lib=/usr/lib/mysql----with-mysql-conf=/usr/bin/mysqlWARNING:Installingto~/.gemsince/home/vinoth/gemsand/home/vinoth/gems/bina
如果这个问题已经得到回答,我提前道歉。我一直在尝试在Google和StackOverflow上搜索此内容,但由于我的搜索查询中包含标点符号,因此搜索引擎往往会对其进行修改并给出无意义的结果。在我的rails应用程序(rails3.2.11,ruby1.9.3)中,我的日志经常是这样的:StartedGET"/apply/contact"for127.0.0.1at2013-01-2917:35:21-0600ProcessingbyJobApplicationsController#showasHTMLParameters:{"id"=>"contact"}[1m[36mJobAppl
我目前正在构建一个需要mysql2gem的RoR项目。我成功安装了gem。因为它出现在我的gem列表中。[root@vc2cmmka035538nsimple_cms]#gemlist***LOCALGEMS***actionmailer(3.2.3)actionpack(3.2.3)activemodel(3.2.3)activerecord(3.2.3)activeresource(3.2.3)activesupport(3.2.14,3.2.3)arel(3.0.2)bigdecimal(1.1.0)builder(3.2.2,3.0.0)bundler(1.1.5)c2c_li
我想使用托管在我自己服务器上的mysql数据库。我已经更改了DATABASE_URL和SHARED_DATABASE_URL配置变量以指向我的服务器,但它仍在尝试连接到heroku的amazonaws服务器。我该如何解决? 最佳答案 根据Herokudocumentation,更改DATABASE_URL是正确的方法。Ifyouwouldliketohaveyourrailsapplicationconnecttoanon-Herokuprovideddatabase,youcantakeadvantageofthissamemec