Best Configuration For My.cnf To Tweak MySQL
Jul 25, 2008
I just got a new server that has 2 quad core intel processors and 4GB of RAM. I am running about 1000 queries per second and have been having some issues where users are being denied a connection to the database every few minutes. I am not sure how to tweak the my.cnf file correctly to solve this issue. The contest of my.cnf are below:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_user_connections=2000
max_connections=2000
interactive_timeout=100
wait_timeout=100
connect_timeout=100
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
thread_concurrency=8
myisam_sort_buffer_size=64M
server-id=1
#[mysql.server]
#user=mysql
#basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192
View 5 Replies
ADVERTISEMENT
Dec 4, 2008
my.cnf configuration
What should be the best configuration(my.cnf) for MySQL in this server :
AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
cache size: 512 KB
speed: 2200.246 MHz
4GB RAM DDR2
350 GB HDD
my current my.cnf contains this :
[mysqld]
set-variable = max_connections=500
set-variable = max_user_connections=100
set-variable = wait_timeout=100
set-variable = interactive_timeout=100
set-variable = local-infile=0
query_cache_limit=30M
query_cache_size=64M
query_cache_type=1
max_allowed_packet=30M
old-passwords = 1
skip-networking
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
View 3 Replies
View Related
Mar 28, 2007
After increasing to 4 Giga memory ram is still a problem exists I could see there is heavy cpu and mysql usage from the Vbulletin forum of the domain " kuwaitup.com".
The mysql configuration had been tweaked in the server and also max allowed connection had been increased to 600 from 500. and i think It is need to optimize the database " q8upcom_vb" so how we can make it ? and in my server only one site
dedicated SERVER
Intel(R) Xeon(TM) CPU 3.06GHz 4CPUS
4000mb ram
100GB type/configuration: Unknown
linux CENTOS Enterprise 4.4 i686
apache/IIS version: apache 1.3.37 (Unix)
PHP version: php 4.4.4
MySQL version: mysql 4.1.22-standard
View 11 Replies
View Related
May 6, 2007
On my Fedora Core 4 Dedicated Server i run:
# MySQL: 4.1.20
# Version protocoll: 10
# Server: Localhost via UNIX socket
This is my problem, the MaxConnection parameter by default is setup to 100 max user connections i want to adjust the limit to a resonable value because if the users go over the limit the MySQL crash and i must restart the server because the entire system don't work.... (probably this is a bug of MySQL 4.1.2 ) but i don't know because i'm not an expert user....
I spoke with Godaddy Sys Admin and they said: "...you must modify the my.cnf file and add:
Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
set-variable = max_connections = (the number that you want)
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Ok i have modified this by adding 1000, but with this new variable the MySQL don't start.....
View 5 Replies
View Related
Jul 20, 2007
mysql configuration..
I'm on a windows vps with 640mb of ram and I'm always at high level of usage of ram and 100% of cpu.. obviously the website slows down and it takes about 15 seconds to show up!
I've tried to put some indexes to my db but I'm not really expert in that.
I've been also told that my problem could be caused by a wrong mysql configuration, so here it is mine:
Code:
# The MySQL server
[mysqld]
; Uncomment for use on USB key
; skip-innodb
datadir=${path}/mysql/data
basedir=${path}/mysql
bind-address=127.0.0.1
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 200M
max_allowed_packet = 1M
table_cache = 200
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 3M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 2
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 100M
sort_buffer_size = 100M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 100M
sort_buffer_size = 100M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
View 1 Replies
View Related
Sep 21, 2007
Would there be any scripts that can optimize a Mysql configuration?
I remember seeing one but I forgot the name and lost the script
View 2 Replies
View Related
Jun 17, 2009
mod_userdir Protection:
Apache's mod_userdir allows users to view their sites by entering a tilde(~) and their username as the uri on a specific host. For example http://test.cpanel.net/~fred/ will bring up the user fred's domain. The disadvantage of this feature is that any bandwidth usage used by this site will be put on the domain it is accessed under (in this case test.cpanel.net). mod_userdir protection prevents this from happening. You may however want to disable it on specific virtual hosts (generally shared ssl hosts.)
We have enabled mod_userdir Protection for all our users but some our clients want to view their website via For example [url]
in this section there is mentioned that You may however want to disable it on specific virtual hosts (generally shared ssl hosts.)
but when i select a domain which i want to disable mod_userdir Protection & then ticked marked on Exclude Protection check box then i have restarted apache web server but still i am unable to view selected domain via IP based
View 2 Replies
View Related
May 10, 2008
if i enable PHP open_basedir Tweak in cpanel, it disables all sites and none load, do note that the other tweak called Apache mod_userdir Tweak is also enabled.
Now i am wondering is if they both clash with each other to compete for the security ?
Anyone else noticed this also?
Info :
WHM 11.15.0 cPanel 11.18.6-S24255
CENTOS Enterprise 5 i686 on standard - WHM X v3.1.0
View 4 Replies
View Related
Apr 5, 2008
i want horde email to be default in greek language...i mean when someone clicks in horde email icon to go automatically on his box...i don't want the screen where he choose the language...is that possible?
View 1 Replies
View Related
Sep 14, 2007
i have few servers that just serve files (1MB-100MB)
Suse Linux on all
the servers have minimal apps installed and i already got a llarge performance increase by dumping apache
now im look at tweaking at the OS level
any settings in Linux itself to speed up sending files down the pipe?
net.ipv4.tcp... in /etc/sysctl.conf?
View 0 Replies
View Related
Apr 5, 2009
Where do I find the file to tweak spawn-fcgi process. I look in lighttpd.conf and php.ini I couldn't find any. I use lighttpd.
View 3 Replies
View Related
May 8, 2009
Since my /var partition is full, so I moved /var/lib/mysql to /backup/mysql/.
Seems all the files are copied and I changed my.cnf reboot mysql, but all the web sites using db is not working anymore..
View 4 Replies
View Related
Jan 21, 2007
I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:
Code:
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2
However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
View 1 Replies
View Related
Oct 6, 2008
I was looking into setting up a new VPS server, without Parallels.
I have a dedicated server running centos. I was thinking about putting Xen on it and the use lxadmin instead of cpanel.
Any thoughts or experience with that setup.
View 4 Replies
View Related
Dec 30, 2007
I just found about about csf so I uninstall afp, bfd and install csf. spend time setting it up but still not getting lik what i want can some one post their csf so i can take a look.
I want to received e-mail at least for the following:
1. someone login ssh
2. someone using su (fail and pass)
3. someone try to brutal force (notify like bfd)
4. possible break in attemp like bfd
5. when ip got ban from brutal force
6. .... and all that good stuff that keep u alert.
it's possible to notify when someone try to login whm and cpanel?
View 1 Replies
View Related
Jun 16, 2008
For some reason mysql wont start, i have tried restarting mysql but it wont, it says FAILED. The mysql.sock file seems to have disappeared and i cannot find it anywhere.
View 5 Replies
View Related
Feb 11, 2008
I recently had a harddrive failure and luckliy I can still access certain directories on this failed drive. I can still access the /var/lib/mysql/ directory which holds all the users databases and have backed all these up separately using tar.
Now what I need to know is how do you restore these database files to another server? I tried simply untar'ing one of these to the new servers /var/lib/mysql/ direcotry and it stuffed Mysql up - it went offline. I had to get a cpanel tech to bring Mysql back online.
how can I get these database files to fully work on a new server?
View 2 Replies
View Related
Jun 14, 2008
Hello All,
I have almost everything setup for my VPS except for the firewall.
Someone told me that you can screw up your VPS if you configure your firewall incorrectly.
Can someone please guide me through? Which firewall should I use? and what all configurations should I make?
My VPS is on Debian 4 and I already have webmin configured on it. It does shows me an option to install a firewall but I just dont have enough courage to do so.
Thanks in advance,
Imoracle
View 3 Replies
View Related
Jul 24, 2009
I installed Mod_Security on my Cent OS server today and having some problem in configurating it.
Problem -
I have added this module in 'httpd.conf' file
Code:
<IfModule mod_security.c>
SecFilterEngine On
SecServerSignature "Apache"
SecFilterCheckUnicodeEncoding Off
SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log
SecFilterScanPOST On
SecFilterDefaultAction "deny,log,status:403"
SecFilterSelective REQUEST_METHOD "^POST$" chain
SecFilterSelective HTTP_Content-Length "^$"
SecFilterSelective HTTP_Transfer-Encoding "!^$"
SecFilterSelective ARG_PHPSESSID "!^[0-9a-z]*$"
SecFilterSelective COOKIE_PHPSESSID "!^[0-9a-z]*$"
SecFilter "../"
SecFilter "viewtopic.php?" chain
SecFilter "chr(([0-9]{1,3}))" "deny,log"
SecFilterSelective THE_REQUEST "wget "
SecFilterSelective THE_REQUEST "lynx "
SecFilterSelective THE_REQUEST "scp "
SecFilterSelective THE_REQUEST "ftp "
SecFilterSelective THE_REQUEST "cvs "
SecFilterSelective THE_REQUEST "rcp "
SecFilterSelective THE_REQUEST "curl "
SecFilterSelective THE_REQUEST "telnet "
SecFilterSelective THE_REQUEST "ssh "
SecFilterSelective THE_REQUEST "echo "
SecFilterSelective THE_REQUEST "links -dump "
SecFilterSelective THE_REQUEST "links -dump-charset "
SecFilterSelective THE_REQUEST "links -dump-width "
SecFilterSelective THE_REQUEST "links http:// "
SecFilterSelective THE_REQUEST "links ftp:// "
SecFilterSelective THE_REQUEST "links -source "
SecFilterSelective THE_REQUEST "mkdir "
SecFilterSelective THE_REQUEST "cd /tmp "
SecFilterSelective THE_REQUEST "cd /var/tmp "
SecFilterSelective THE_REQUEST "cd /etc/httpd/proxy "
SecFilterSelective THE_REQUEST "/config.php?v=1&DIR "
SecFilterSelective THE_REQUEST "/../../ "
SecFilterSelective THE_REQUEST "&highlight=%2527%252E "
SecFilterSelective THE_REQUEST "changedir=%2Ftmp%2F.php "
# Very crude filters to prevent SQL injection attacks
SecFilter "delete[[:space:]]+from"
SecFilter "insert[[:space:]]+into"
SecFilter "select.+from"
# Weaker XSS protection but allows common HTML tags
SecFilter "<[[:space:]]*script"
# Prevent XSS atacks (HTML/Javascript injection)
SecFilter "<(.|n)+>"
</IfModule>
But my website is multi forum hosting and requires 'index.php' file to pass parameter to make it work.
Example -
[url]
[url]
[url]
So i had to delete below mention code from above module.
Code:
SecFilterSelective REQUEST_METHOD "^POST$" chain
SecFilterSelective HTTP_Content-Length "^$"
SecFilterSelective HTTP_Transfer-Encoding "!^$"
SecFilterSelective ARG_PHPSESSID "!^[0-9a-z]*$"
SecFilterSelective COOKIE_PHPSESSID "!^[0-9a-z]*$"
SecFilter "../"
View 0 Replies
View Related
Jan 28, 2009
Do you think this configuration is doable?
Dual Core/Core2Duo
2GB Ram
500GB HDD
100mbps port
Win 2003/2008 Web Edition
~2000-3000GB bandwidth
~$100/month?
View 8 Replies
View Related
Oct 23, 2009
I need your opinion on the best drive configuration for my Dell poweredge 2850 dual 3.0.
I have 6 x 72gb scsi 10k hds, and perc4 raid in server. My os will be Cent os with 4 gigs of ram installed. I want to try to make this server as redundant as possible.
Offsite backup is also in plans. I’m going to use this server for a few sites (5 - 10) that are db driven, and host small video clips as Dolphin Smart Community. Server will be colocated. Please let me know if missed something .
View 6 Replies
View Related
Feb 8, 2009
serverlof but dedicadet bought and set up on my vmserver not connect to the internet vps.
Companies can connect to the internet with NAT, but only with my NAT can not connect to the internet with the other global ip.
Information about how to do VMServer settings may wonder Do you have friends?
View 0 Replies
View Related
Apr 14, 2009
i have node 16 cpu AMD 64 gb ram HDD sas 15 with raid 10 /hypervm + openvz i host 10 vps
my problem when any vps load go over 2 the Node load go to 30 - 40 some time 100 i set CPU UNITS , Number Of CPUS and Cpu Usage for every vps but the load in node is go up
how i can set limit in vps and prevent from effect on load Node?
View 2 Replies
View Related
Apr 9, 2009
I Want to use ASSP for a large number of server with different IP,
ASSP is use as SMTP proxy for the outbound traffic,
In Relaying > AcceptAllMail in put my network,
the question is : does the network will be scanned by assp, i have see that the network contribute to the whitelist?
View 4 Replies
View Related
Jul 14, 2008
My VPS mostly have problem of over load and its beacuse of lot of mails in Mail Queue,
Can any one recommend me best best Exim Configuration in cpanel.
I think no mail stay in Queue more then 2 hours. It delete autometically or any other thing you recommend. It help me for less load.
View 3 Replies
View Related
Aug 29, 2008
Can not connect to remote socket.
IO:ocket::INET configuration failederror:00000000:lib(0):func(0):reason(0)
This can caused by a few things:
The cPGSD server is not running on 127.0.0.1:2082
There is a firewall blocking access to 127.0.0.1:2082
127.0.0.1 is not the right IP and/or 2082 is not the right port
Solar Flares (Please contact support to investigate)
I used Cpanel 11 dont known where turn off firewall T-T
View 0 Replies
View Related
Dec 5, 2008
I just bought a subscription to dnsmadeeasy and changed my nameservers already. Now I did a dns report check and found the following: Reverse MX A records (PTR)ERROR: No reverse DNS (PTR) entries. The problem MX records are:
68.x.x.x.in-addr.arpa -> no reverse (PTR) detected
You should contact your ISP and ask him to add a PTR record for your ips
Can anyone tell me how to fix this with the dnsmadeeasy interface? I tried adding a PTR record, typed the IP but it always adds my domain name at the end.
Additionally, the IP it says 68.x.x.x is completely different from my server.. which is 69.x.x.x -- how is that ? The SOA record isrimary nameserver: ns0.dnsmadeeasy.com
Hostmaster E-mail address: dns.dnsmadeeasy.com
Serial #: 2008010106
Refresh: 43200
Retry: 3600
Expire: 1209600 2 weeksDefault TTL: 180
Is this default TTL too little? I checked some other domains and it was always more. MX Records:
I have a dedicated server with hostname named after my primary domain and mail on mail.example.com
But now when I add other domains via dnsmadeeasy, the mx only allows mail.thisdomain.com instead of mail.example.com
Is this normal? Do I just need to enter the main IP of my server and that's it? The name itself does not matter?
View 2 Replies
View Related
Dec 10, 2008
we installed CMS for our website, when a client want to signup to our website, the confirmation email send to theie Spam Box, we want to our email send to theire Inbox. how can i resolve this problem?
View 6 Replies
View Related
Aug 13, 2008
I've recently been trying to get my domain name volmasoft.com onto my new vps.
What i've done so far:
* setup a host for ns1.volmasoft.com to go to 69.162.73.83
* setup a host for ns2.volmasoft.com to go to 69.162.73.84
* Set volmasoft.com to use ns1.volmasoft.com and ns2.volmasoft.com.
After 3 days it's finally gone off the godaddy page and proporgated (or so I thought)
I now get an "address not found" I can't trace the domain, nor ping it as it can't resolve the domain. However the whois does show that it's set to the ns1 and ns2 nameservers and IP of 69.162.73.83.
View 6 Replies
View Related