有大量stream量的数据库运行主要innodb,并希望更好地优化MySQLconfiguration。 服务器有32Gb ram,最大的表是〜18Gb innodb。 我想我已经做了所有显而易见的事情来改善性能,但是不知道别人会推荐什么。 [mysqld] datadir=/mysql/data socket=/var/lib/mysql/mysql.sock pid-file=/var/run/mysqld/mysqld.pid key_buffer_size=1G read_buffer_size=16M sort_buffer_size=16M innodb_data_home_dir=/mysql/innodb innodb_log_group_home_dir = /mysql/log innodb_file_format=barracuda innodb_file_per_table=true innodb_thread_concurrency=8 innodb_buffer_pool_size=20G innodb_additional_mem_pool_size=128M innodb_log_buffer_size=512M innodb_flush_method=O_DIRECT innodb_flush_log_at_trx_commit=2 innodb_lock_wait_timeout=50 myisam_sort_buffer_size=64M read_rnd_buffer_size=32M max_connections=125 max_user_connections=90 sql-mode=traditional tmpdir=/mysql/tmp slow-query-log=1 slow-query-log-file=/mysql/tmp/mysql_slow_queries.log max_allowed_packet=32M tmp_table_size=128M max_heap_table_size=128M open_files_limit=8096 join_buffer_size=256M thread_cache_size=150 table_cache=8096 query_cache_size=512M query_cache_limit=32M expire-logs-days=3 log-error = /mysql/log/mysqlderror.log max_binlog_size=1G interactive_timeout=3600 wait_timeout=28800 [mysql.server] user=mysql [safe_mysqld] err-log=/mysql/log/mysqld-err.log pid-file=/var/run/mysqld/mysqld.pid [mysqldump] […]
我们有一个C程序(来源如下)。 我们编译它: gcc -Wall -Wextra -g $(mysql_config –cflags) get1ReceiveSource.c $(mysql_config –libs) -lrt -o get1Receive 当使用./get1Receive在terminal上运行时,select会给出完美的结果。 我们使用cron条目每分钟转到cron作业的那一刻 /1 * * * * /usr/local/bin/get1Receive >> /var/log/myalert1.log 2>&1 我只是不能看到它得到任何结果。 我已经debuged使用gdb ,它完美的罚款,我已经设置了断点,一步一步,我可以看到它进入循环太好。 我也附加了env值,我怀疑mysql有问题吗? 有什么想法吗? C代码: #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <stdio.h> #include <time.h> #include <sys/time.h> #include <signal.h> #include <mysql.h> #include <string.h> #include <syslog.h> #define SMALLSIZE 20; int […]
我有一个服务器,我有内存不足的问题。 根据消息日志,这导致apache和mysql被杀死。 kernel: [29992047.769005] Out of memory: Kill process 13541 (httpd) score 10 or sacrifice child kernel: [29992047.769005] Killed process 13541 (httpd) total-vm:70432kB, anon-rss:11016kB, file-rss:168kB 奇怪(虽然是件好事),它自动启动,我不知道如何。 我仍然需要调查内存不足的错误,但是我对自动启动的方式一无所知。 我已经在自己的Amazon EC2小实例上设置了apache和mysql。 这个或其他自动脚本除了通常的chkconfig安装程序启动时没有任何cron作业。 大多数人对此好奇,但知道何时以及如何再次启动apache和mysql将会很有用。 也可能对我的其他服务有用。
我已经在我的ami linux微型实例上安装了tomcat7和mysql55。 我想弄清楚如何configurationtomcat7与mysql通信,但没有运气。 我一直是glassfish用户,所以通过gui很简单,但是对于tomcat,我不知道如何configuration它。 我看了tomcat7上的Apache文档,但发现自己更加困惑。 我不知道我需要编辑的文件在哪里,我不知道如何编辑它们。 我需要安装一个MySQL驱动程序? 我使用JDBC还是JNDI? 我的应用程序是一个使用Hibernate的Tapestry5应用程序,所以我不确定是否重要。 有谁知道一个很好的指导或可以提供示例代码如何做到这一点? 只是为了logging,我只有几个小时的Linux后,所以我非常绿色,当涉及到任何Linux相关的。 UPDATE 我发现了以下的默认configuration <!– <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> –> 我正在使用hibernate,并在hibernate.cfg.xml中使用以下 <hibernate-configuration> <session-factory> <property name="hibernate.connection.datasource">jdbc/mydatabase</property> 我注释了上面的资源,并添加了以下内容,但这似乎也不起作用。 我也注意到我不再有权访问tomcatpipe理器。 <Resource type="javax.sql.DataSource" name="jdbc/mydatabase" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mysql" username="root" password="password" /> 我将以下内容添加到了context.xml文件中 <ResourceLink type="javax.sql.DataSource" name="jdbc/mydatabase" global="jdbc/mydatabase" 有人知道我在做这个configuration错了吗?
我试图让mysqlnd_ms(master_slave)插件运行,但收到错误,configuration文件包含和意外的括号。 为了确保我没有损坏任何东西,我在全新的安装上复制了这个错误。 这两个安装都是使用打包的PHP-5.3.10的Ubuntu 12.04-LTS,并通过Apache的模块运行。 由于php5-dev软件包不包含mysqlnd的头文件,所以我不得不跳过一些文件来让PECL安装这个软件包。 我正在遵循MySQL的网站20.7.6.4的指导。 快速入门和示例 这是我看到的错误: root@mysqlndms:~# php -v PHP: syntax error, unexpected '{' in /etc/php5/cli/conf.d/mysqlnd_ms_plugin.ini on line 1 PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:34:31) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies root@mysqlndms:~# 这是.ini文件的内容: root@mysqlndms:~# cat /etc/php5/cli/conf.d/mysqlnd_ms_plugin.ini { "myapp": { "master": { […]
我正在使用MySQL master-masterconfiguration的心跳,并使用mon来检查MySQL的健康状况。 所有的检测工具都可以很好地检测到主机或破损的MySQL。 但是接pipe之后,复制冲突开始堆积起来。 是否可以通过运行一个外部脚本添加一个挂钩到心跳,使其在接pipeIP地址之前等待? 我写了一个检查复制的代码,然后用代码0或1退出,具体取决于是否全部清除继续,并等待复制完全赶上以避免冲突。
我无法连接到MySQL的特定数据库,即使从phpMyAdmin,我得到以下错误: #2002 – Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) The server is not responding (or the local server's socket is not correctly configured). 在MySQL日志中我看到: 130404 1:18:09 InnoDB: MySQL and InnoDB data dictionaries are out of sync. InnoDB: Unable to find the AUTOINC column id in the InnoDB table strangedb/table. InnoDB: We […]
我们有一个MySQL数据库服务器,它运行在我们希望远程连接的Amazon Linux Instance上。 我们已经在AWS安全组中为我们的LAN网关方式IP设置了端口3306的访问权限。 我们已经执行了下面的命令来授予对我们连接数据库和输出的IP的访问权限,如下所示 GRANT ALL PRIVILEGES ON *.* TO 'root'@'our IP Address' IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec) 在尝试使用MySQLpipe理员工具连接数据库时,仍然收到以下错误消息: Host: Our IP address where MySQL server runs User : root Password: Our password MySQL Error: Could not connect to the specified instance. MySQL error number 2003 Can't connect to […]
我试图用XAMPP启动mysql而没有成功。 Apache的工作正常,但当MySQL尝试启动显示无法启动MySQL! 这里是日志 130408 11:07:05 mysqld_safe Starting mysqld daemon with databases from /u01/lampp/lampp/var/mysql 130408 11:07:05 [Note] Plugin 'FEDERATED' is disabled. 130408 11:07:05 InnoDB: The InnoDB memory heap is disabled 130408 11:07:05 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 130408 11:07:05 InnoDB: Compressed tables use zlib 1.2.3 130408 11:07:05 InnoDB: Initializing buffer pool, size = […]
通过传输实用程序传输多个帐户时出现此错误: 错误:无法转储一个或多个数据库 我被一个cPanel技术人员告诉了我 Here is the specific error I'm seeing on some of the accounts: warn [pkgacct] eli_test: mysqldump: Got error: 1034: Incorrect key file for table 'bak_components'; try to repair it when using LOCK TABLES You may need to try to repair these tables as suggested in the error. After some further research I […]