我们正在使用asynchronous复制构build一个简单的主/从MySQLconfiguration,在服务器和基于innoDB的表上都使用MySQL企业版5.5.17。 在主服务器崩溃的情况下,我们希望向用户提供使用从服务器的最新数据库内容恢复主服务器的可能性。 在主服务器上,数据库和二进制日志存储在不同的磁盘设备上,以提高可靠性。 什么是最好的方法来做到这一点? 我试图概述一个这样的程序,但我不确定这是否正确: 确保从站的中继日志中包含的所有语句都已执行。 理想情况下,我可以执行一个STOP SLAVE IO_THREAD,即使不应该有必要,因为主设备已经崩溃,没有其他语句来到从设备,并等待其余的继电器事件完成。 closures从站上的数据库并将文件复制到数据库文件到主站。 从relay-log.info和slave上的master.info,我应该能够找出从设备正在从哪个位置读取最新的二进制日志。 在主服务器崩溃到日志中最后一条语句之前,我可以从主服务器执行的最后一条语句重播主服务器上的二进制日志。 我应该重置从服务器并在主服务器崩溃之前重新启动从服务器执行的最后一个语句的复制。 这个可以吗?
我最近在CentOS 6.2上安装了MySQL 5.1,并且比我们运行的MySQL 4.1有更高的性能。 所以我把MySQL 5.1升级到MySQL 5.5,看看是否有更多的收获,但是它实际上只是MySQL 5.1安装的一半。 我运行的testing是在一张桌面上,有一百二十万条logging的blob笔记。 5.1:57.5899秒 5.5:96.3821秒 真正有意思的是,如果我拉下10万条logging,那么5.5会跳过5.1,但是最终会使5.5负载像尖峰一样; 加速和加速,这是多余的秒钟似乎来自哪里。 任何想法,为什么这是? 同样的my.cnf 5.1和5.5 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 bind-address = xxx.xxx.xxx.xxx #This option makes InnoDB to store each created table into its own .ibd file. innodb_file_per_table=1 max_allowed_packet=900M [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
我正试图用命令导入641 MB MySQL数据库: mysql -u root -p ddamiane_fakty < domenyin_damian_fakty.sql 但我得到一个错误: ERROR 1064 (42000) at line 2351406: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br /> <b>Fatal error</b>: Maximum execution time of 300 seconds exceeded in <b' […]
我把mysql的general_log_filevariables的值改成了其他的值,现在我试图把它改回原来的版本/var/lib/mysql/ubuntu.log 。 但是当我这样做: SET GLOBAL general_log_file = '/var/lib/msyql/ubuntu.log'; 我得到这个错误: 错误1231(42000):variables'general_log_file'不能设置为'/var/lib/msyql/ubuntu.log'的值 这是怎么回事?
我在my.cnf文件中search正确的variables的互联网。 有人说, key_buffer_size已经被弃用了,但有人说key_buffer_size中的key_buffer_size是正确的variables。 那么,这里真正的variables是什么? 是key_buffer还是key_buffer_size ? 我使用Ubuntu 12.04。 我也有my.cnf文件中的两个key_buffervariables。 这是我安装MySQL后得到的。 第一个位于这个下面: [mysqld] key_buffer = 16M 另一个位于这个下面: [isamchk] key_buffer = 16M
创build一个自签名的SSL证书后,我configuration了我的远程mysqld来使用它们(并且启用了ssl) 我SSH到我的远程服务器,并尝试连接到自己的mysqld使用SSL(MySQL服务器是5.5.25).. ~> mysql -u <user> -p –ssl=1 –ssl-cert=client.cert –ssl-key=client.key –ssl-ca=ca.cert Enter password: ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1) 好吧,我记得读过这个连接到同一台服务器通过SSL的一些问题。 所以我下载客户端键到我的本地盒,并从那里testing… ~> mysql -h <server> -u <user> -p –ssl=1 –ssl-cert=client.cert –ssl-key=client.key –ssl-ca=ca.cert Enter password: ERROR 2026 (HY000): SSL connection error 它不清楚这个“SSL连接错误”错误是指,但如果我省略-ssl-ca,那么我可以使用SSL连接.. ~> mysql -h <server> -u <user> -p –ssl=1 –ssl-cert=client.cert –ssl-key=client.key Enter password: Welcome […]
在客户打来电话说他的网站closures后,我发现我们的RackSpace Cloud Windows 2008服务器上的MySQL没有运行。 我重新启动MySQL,但得到了浏览器中的所有网站与MySQL数据库的“拒绝访问用户”错误。 当我查看MySql Server 5.5 / data时,除了mysql和performance_schema以外,没有其他文件夹。 看来所有的数据库和数据都被抹去了。 有谁知道可能发生了什么,数据在哪里? 最重要的是,我刚刚发现这个服务器从我们的备份服务丢失。 ps似乎是在今天凌晨4:01的Windows更新之后。
我从MySQL 5.1升级到5.5,运行mysql_upgrade并得到这个输出: # mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck FATAL ERROR: Upgrade failed 任何想法在哪里寻找发生了什么(或不发生?),所以我可以修复任何错误,实际上运行mysql_upgrade ? 谢谢! 更多的输出: # mysql_upgrade –verbose Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck FATAL ERROR: Upgrade failed # mysql_upgrade –debug-check –debug-info Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck FATAL ERROR: […]