How To Setting Mysql Date/time
Mar 5, 2007how to setting mysql data / time?
server have -9 H from our
We have setting under WHM for time server but we also need to setting mysql
how to setting mysql data / time?
server have -9 H from our
We have setting under WHM for time server but we also need to setting mysql
The other server that I'm working on issues the wrong date/time when I run
$ date
Wed Oct 17 20:01:03 CDT 2007
I tried the same command on the other server
Wed Oct 17 11:01:03 CDT 2007
When i try setting time zone to GMT, it do not worked.
# date
Thu Jun 26 10:05:20 UTC 2008
# ln -s /usr/share/zoneinfo/GMT /etc/localtime
# /usr/sbin/ntpdate time.nist.gov
26 Jun 06:05:27 ntpdate[29806]: step time server 192.43.244.18 offset 1.429150 sec
# date
Thu Jun 26 06:05:27 EDT 2008
It still shows time in EDT.
I have the same problem in other server also, both servers are CentOS 5.2
When i set to UTC, it works
# date
Thu Jun 26 06:10:16 EDT 2008
# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/UTC /etc/localtime
# date
Thu Jun 26 10:10:16 UTC 2008
#
I have just purchased an unlimited domain
Many gurus and seasoned IM'ers alike have said that you actually don't need any technical knowhow to set up your business. But no sooner have you started than you realize that it's not the case and you have to get up to speed very quickly.
Just a couple of questions here, if I may:
1. What advice would you give to someone who has just purchased a new "unlimited" domain and knows diddly squat about all these technical issues?
2. I was reading what someone else said about add-on domains vs using Apache to redirect the add-on domains.
- what is the best way to actually set up your site so that you can have 1 main domain and then a bunch of others?
-should you rather use redirects (whatever that means)?
-What is Apache?
3. What is WHM?
Your collective help would be invaluable....
I just want to be able to set the thing up correctly....
Heres what Ive done created a new user and set their home directory as /home/<user>. I then made a public_html folder within their home dir.
Then I went into httpd.conf, and added a virtual host for that domain with the document root to the public_html dir i created .
At this point, what is there left to do? I need to mess with the DNS right? Anything else?
I have a server in USA which I have leased to a customer. The customer is running an application in the server and for that he needs the timezone to be set IST in the server. If he does the same, then will it affect the working of the server. What can be the ill-effects of the same. The customer is running Windows 2003 server.
View 1 Replies View RelatedI really had a hard time in setting red5 on my VPS in /usr/local/red directory, I have done all the installation steps but still the port tester does not show success, I am using centos5 with cpanel installed, i have the installation steps from red5 forum but pretty much unsure what needs to be done after installation
1. I have only iptables installed and even if I remove iptables the port tester does not work properely
I've been using dedicated hosting in places like the planet and rackspace for a long time now, but we're about to purchase a rack in a local data facility. This is my first time setting up a rack environment, so I have a bunch of questions.
They'll be giving me an ethernet drop into the cabinet. I have to take it from there. I'm thinking I needed a router/firewall. Am I right? Can those be a single device? Should they be? Which models would you recommend? (We're still a small operation, we don't usually push more than 1Mbps bandwidth).
Mysql is restarting all the time, but when I look at the log file, I got the following error message. Anyone has any idea about this issue?
080604 22:48:45 InnoDB: Started; log sequence number 0 1304279005
080604 22:48:45 [Warning] mysql.user table is not updated to new password format; Disabling new password usage until mysql_fix_privilege_tables is run
080604 22:48:45 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.45-community' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition (GPL)
080604 22:48:46 [Note] /usr/sbin/mysqld: Normal shutdown
080604 22:48:46 InnoDB: Starting shutdown...
080604 22:48:49 InnoDB: Shutdown completed; log sequence number 0 1304279005
080604 22:48:49 [Note] /usr/sbin/mysqld: Shutdown complete
My MySQL server take too much time to start. I moved the data folder to its own hard disk, but still no improvement.
# uptime;date;service mysqld start;date;uptime;service httpd start
05:46:15 up 5 days, 1:24, 2 users, load average: 0.24, 1.07, 1.23
Wed May 7 05:46:15 CDT 2008
Starting MySQL: [ OK ]
Wed May 7 06:04:21 CDT 2008
06:04:21 up 5 days, 1:42, 1 user, load average: 1.77, 1.65, 1.50
Starting httpd: [ OK ]
#
You see MySQL take 18 minutes to start.
This happens whenever i restart the server or restart mysql.
Here is the process while MySQL starts
# ps aux|grep mysql
root 23549 0.0 0.0 4448 1168 pts/0 S+ 05:24 0:00 /bin/sh /sbin/service mysqld start
root 23556 0.0 0.0 4628 1272 pts/0 S+ 05:24 0:00 /bin/bash /etc/init.d/mysqld start
root 23613 1.5 7.5 157668 154580 pts/0 D+ 05:24 0:01 chown -R mysql:mysql /backup/mysql
root 23780 0.0 0.0 3896 664 pts/1 S+ 05:26 0:00 grep mysql
#
It is chown that make the MySQL startup slow.
MySQL data size is about 11 GB.
I've got a 2.8 Dual Xenon with 2GB of ram. Taking a look at my "top" output I see the following:
Code:
18119 nobody 15 0 20812 20M 9764 S 0.8 0.9 0:05 0 httpd
3388 mysql 16 0 105M 97M 1908 S 0.7 4.8 95:08 1 mysqld
22225 nobody 15 0 18920 18M 9060 S 0.7 0.9 0:02 2 httpd
3391 mysql 16 0 105M 97M 1908 S 0.5 4.8 95:33 1 mysqld
13612 nobody 15 0 16872 16M 7192 S 0.4 0.8 0:05 3 httpd
21871 nobody 15 0 20712 19M 7768 S 0.4 0.9 0:02 2 httpd
I've got MySQL process running 95+ minutes. This isn't the first time it's happened.
I've seen it go as high as 120 minutes. The load average is 1.2. All my sites that use MySQL i.e. Wordpress blogs all run fine.
Looking at "MyTop" output everything looks normal:
Code:
MySQL on localhost (4.0.27-standard) up 37+01:40:24 [20:42:31]
Queries: 39.9M qps: 13 Slow: 211.0 Se/In/Up/De(%): 87/01/04/01
qps now: 9 Slow qps: 0.0 Threads: 20 ( 1/ 49) 64/04/09/09
Cache Hits: 27.5M Hits/s: 9.0 Hits now: 4.4 Ratio: 79.3% Ratio now: 73.3%
Key Efficiency: 100.0% Bps in/out: 571.7/961.9 Now in/out: 941.1/385.6k
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
1263533 root localhost mysql 0 Query show full processlist
1263663 gwz3phj_v localhost gwz3phj_va 8 Sleep
1262512 DELAYED gwz3phj_va 9 Delaye Waiting for INSERT
1263618 gwz3phj_v localhost gwz3phj_va 9 Sleep
1263658 gwz3phj_v localhost gwz3phj_va 15 Sleep
1263659 gwz3phj_v localhost gwz3phj_va 15 Sleep
1263617 gwz3phj_v localhost gwz3phj_va 22 Sleep
1263651 gwz3phj_v localhost gwz3phj_va 22 Sleep
1263642 gwz3phj_v localhost gwz3phj_va 37 Sleep
1263640 gwz3phj_v localhost gwz3phj_va 43 Sleep
1263636 gwz3phj_v localhost gwz3phj_va 52 Sleep
1263633 gwz3phj_v localhost gwz3phj_va 53 Sleep
1263630 gwz3phj_v localhost gwz3phj_va 55 Sleep
1263631 gwz3phj_v localhost gwz3phj_va 55 Sleep
1263624 gwz3phj_v localhost gwz3phj_va 74 Sleep
1263625 gwz3phj_v localhost gwz3phj_va 75 Sleep
1263623 gwz3phj_v localhost gwz3phj_va 78 Sleep
1263615 gwz3phj_v localhost gwz3phj_va 79 Sleep
1263621 gwz3phj_v localhost gwz3phj_va 85 Sleep
1263616 gwz3phj_v localhost gwz3phj_va 88 Sleep
Overall my server is running just fine but these odd long running MySQL process have me worried.
I am setting up Geeklog and I have this question:
$_DB_host = 'localhost'; // host name or IP address of your DB server
What should I put as a 'localhost'?
1) domain.com
2) IP address of domain.com
3)?
where it says Database server IP, I don't know if that is the same IP of my domain name or how to find out the DB server IP
We have a dedicated server and we host 4 news portals based on e107 and joomla.
My partner on Sunday has upgraded mysql from version 4 to 5. Now the server experiences very high CPU usage and query time on portals has been increased very much.
We used to have query times lower than 1 sec for the main page of [url](which is a site that receives about 2000 visits/day) and now query times are 5-15sec !
Does anybody know if this is makes sense ?
Below is the server Status from WHM :
-------------------------------------
cpdavd up
cpsrvd up
exim (exim-4.69-15.1_cpanel_maildir) up
ftpd up
httpd (2.2.11 (Unix)) up
imap up
interval up
mysql (5.0.67-community-log) up
named (9.3.4) up
pop up
rsyslogd up
spamd up
syslogd up
Server Load 6.97 (1 cpu)
Memory Used 49.4 %
Swap Used 0.23 %
Disk /dev/hda3 (/tmp) DMA+ 70 %
Disk /dev/hda5 (/) DMA+ 22 %
Disk /dev/hda1 (/boot) DMA+ 14 %
Below is the Server Information from WHM :
------------------------------------------
Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz
Processor #1 speed: 2394.068 MHz
Processor #1 cache size: 2048 KB
Memory Information
Memory: 2064420k/2087424k available (2091k kernel code, 21752k reserved, 846k data, 236k init, 1169920k highmem)
System Information
Linux server.aktoweb.biz 2.6.20-1.2319.fc5 #1 Mon May 21 19:52:13 EDT 2007 i686 i686 i386 GNU/Linux
Physical Disks
hda: WDC WD3200AAJB-00TYA0, ATA DISK drive
hda: hw_config=600d
hda: hw_config=600d
hda: max request size: 512KiB
hda: 625142448 sectors (320072 MB) w/8192KiB Cache, CHS=38913/255/63<6>hda: hw_config=600d
hda: cache flushes supported
Current Memory Usage
total used free shared buffers cached
Mem: 2066428 1756324 310104 0 339576 486636
-/+ buffers/cache: 930112 1136316
Swap: 1052248 2428 1049820
Total: 3118676 1758752 1359924
Current Disk Usage
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 288G 60G 213G 22% /
/dev/hda1 99M 13M 82M 14% /boot
tmpfs 1009M 0 1009M 0% /dev/shm
/dev/hda3 494M 215M 254M 46% /tmp
Below is the CPU/Memmory/Mysql Usage from WHM :
-------------------------------------------------
mysql42.707.300.0
Top Process%CPU 42.7/usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.aktoweb.biz.pid --skip-external-locking
Top Process%CPU 42.6/usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.aktoweb.biz.pid --skip-external-locking
giaprakigiapraki.com2.7012.111.7
Top Process%CPU 1.3httpd [urll] [/e107_plugins/pm/pm.php?inbox]
Top Process%CPU 1.1httpd [url] [/e107_plugins/forum/forum_viewforum.php?87]
Top Process%CPU 1.0httpd [url] [/e107_plugins/chatbox_menu/chatbox_iframe.php]
adsnetadsnet.gr1.177.900.7
Top Process%CPU 0.5httpd [adsnet.gr] [/www/delivery/lg.php?bannerid16&campaignid4&zoneid5&chan]
Top Process%CPU 0.4httpd [adsnet.gr] [/www/delivery/lg.php?bannerid50&campaignid6&zoneid15&cha]
Top Process%CPU 0.3httpd [adsnet.gr] [/www/delivery/lg.php?bannerid183&campaignid77&zoneid1&ch]
r40r40.gr1.073.340.0
Top Process%CPU 1.1httpd [r40.gr] [/index.php?optioncom_fireboard&Itemid188&funcshowcat&cat]
Top Process%CPU 0.5httpd [r40.gr] [/images/fbfiles/avatars/s_64.png]
Top Process%CPU 0.3httpd [r40.gr] [/index2.php?optioncom_jim&taskxml&no_html1]
root0.278.532.0
Top Process%CPU 0.2[kjournald]
alex123alexandroupoli.net0.030.270.0
Top Process%CPU 0.1httpd [alexandroupoli.net] [/e107_images/banners/banner468x60-alexandroupolinet.gif]
galfasgalfas.gr0.030.270.0
Top Process%CPU 0.1httpd [galfas.gr] [/racing/images/galfas_R40_banner.jpg]
eximstats0.000.000.3
nobody0.001.100.0
mailnull0.000.000.0
unauthenticated0.000.000.0
named0.000.10
MySQL didn't work well on my server so I had a look at the err file. It indicates that MySQL is getting started and stopped all the time. After it has started it will stop and then start again etc:
070106 14:40:25 InnoDB: Started; log sequence number 5 959534492
/usr/sbin/mysqld: ready for connections.
Version: '4.1.21-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Communi$
A mysqld process already exists at Sat Jan 6 14:40:28 CST 2007
070106 14:40:38 [Note] /usr/sbin/mysqld: Normal shutdown
070106 14:40:38 [ERROR] /usr/sbin/mysqld: Sort aborted
070106 14:40:40 InnoDB: Starting shutdown...
070106 14:40:41 InnoDB: Shutdown completed; log sequence number 5 959534492
070106 14:40:41 [Note] /usr/sbin/mysqld: Shutdown complete
070106 14:40:42 mysqld ended
070106 14:40:42 mysqld started
070106 14:40:42 InnoDB: Started; log sequence number 5 959534492
Running CentOS 4.6. Currently, the my.cnf contains:
Code:
[mysql.server]
user=mysql
basedir=/var/lib
If I moved all files and directories under /var/lib/mysql/ to /harddisk3/mysql/ what do I enter for the basedir path?
I have a script that pulls information from a mysql database. The script pulls information on english, spanish and portuguese.
There are some spanish and portuguese characters that are not displayed correctly.
How can I setup MySQL database to correctly display those characters:
These are some of the wierd portuguese characters displayed:
nós, e foi. Nós jÃ
After 2 years of application hosting on ixwebhosting.com i have overloaded their mysql servers for the forth time and now if i overload them again i'll get banned.
Each time i got overloaded My database was taken away for a almost a week and i had to beg everyone / write a letter to the CEO so they'll return the database.
I now need to sireously move to a VPS / Dedicated server
or my database will be deleted permenantly including all my 10 gigabytes of usergenerated data and content heh.
The wrost thing is i can't even monitor these overloads and ixwebhosting just take away your databases and say "STOP, you overloaded!" that's it - you're screwed.
I really modified my scripts these 2 days so i won't overload them again and get the final booting (that's after i paid 2 years upfront - 260$), but guess what, they can't even tell me if i'm now overloading the servers after i done all the tweaking.
Guess it's time to get all the data to my comuter before they say i have overloaded again and all my 12 my sites get blown away.
I need to switch fast i don't have much time as it seems and my most important site has 8k unique visitors per day - that's why the over loading occurs, heh, because im just too big - UNLIMITED MY ARSE.
I've been looking for a host and the best i found (after 2 days of forum readings and google searching ) where:
1. inmotionhosting VPS.
2. rackforce.com DDS.
3. Iweb.com
Please any suggestion / comments to where should i go to host will save my buissness, my main concern is my 8k per day site with 2.5 page views per user and 2 mysql queries per page.
looking for a good company with managed everything (I know nothing about hardware managment - i'm a php / mysql geek at the most) and technical support with great uptime and a good ping / connection to israel's area is a big plus.
I can't seem to get passed p21 of Database Driven Website by Kevin Yank. But I'm learning
Ive got the latest copy and and want to follow it through to see what i can learn (lots I'm sure)
Im on a mac osx and am trying to set the root password. He says to do this using terminal in the bin directory of my MySql installation.
Where is it? i know basics about getting round terminal i.e changing directories and stuff.
I have this error when i put import to mysql database
Code:
#1064 - 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 '<script></script><p>ERROR: Maximum execution time of 300 seconds exceeded (Util.' at line 244
I have in domain > doemainname >
max_execution_time
Standaard
Geef een aangepaste waarde op 0
and insert in
usr/local/psa/admin/htdocs/domains/databases/phpmyadmin in the file config.sample.inc.php following command
$cfg['ExecTimeLimit'] = 70000;
but it will not work...
on optimizing mysql
My server specs:
Quote:
Server: Quad Processor Quad Core Opteron 8344 - 1.80GHz - 16 x 512KB cache
Ram: 8 GB DDR2 Registered 667
Disk Controller: SA-SCSI RAID 1 Disk Controller
First Hard Drive: 147GB SA-SCSI 10K RPM
Second Hard Drive: 147GB SA-SCSI 10K RPM
my.conf file:
Quote:
[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=25
max_connections=500
interactive_timeout=10
wait_timeout=10
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=8M
read_buffer_size=8M
max_connect_errors=10
thread_concurrency=16
"/etc/my.cnf" 57L, 893C
[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=25
max_connections=500
interactive_timeout=10
wait_timeout=10
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=8M
read_buffer_size=8M
max_connect_errors=10
thread_concurrency=16
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
#[mysqldump]
#quick
#max_allowed_packet=16M
[mysql]
no-auto-rehash
[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout
is this good enough or we could fine tunning it more?
I have a busy dating website with 30 000 registered users and ~200-600 users online all the time. I would like to offer free email with ~10 MB mailbox to all users.
I have an idea to use scripts provided by b1gmail.de. Its similar to Hivemail or Socketmail. It uses only one POP3 catch-all mailbox and stores all emails in MySQL database, including attachments.
My worries are about MySQL. If I have 30 000 users and each user has some 5000 messages in his/her mailbox:
30 000 x 5 000 = 150 000000
That's 150 million rows in one table!
I know, not all users will have 50000 messages in their mailboxes, but the number of users increases about +2000/month.
I can't imaggine how long time will need MySQL to find messages for each user in the table with 150 000000 rows.
I don't know - maybe it's not a problem at all. I just never had such large tables and I don't know if it's possible at all.
Another problem: I have Fedora Core 2 installed and even don't know yet if it supports files larger than 2 GB.
Maybe it's better to set-up normal POP3 mailboxes for all users instead of using one catch-all box and storing data in MySQL?
do not post warnings about spammers. In the beginning I'll provide email addresses only to "gold" members. I opened this thread because I don't want to set-up a system which will hang after a couple of months because MySQL will not be able to handle it or I will have other unknown problems.
This is a rare issue i have on a RHEL 5.2 + cPanel server.
Server time is:
Tue Nov 11 17:02:51 CST 2008
Squirrelmail time show:
Code:
Last Refresh:
Tue, 5:02 pm
So, that is correct too..
But email arrives with -4 hours time, example:
webmaster@xxx.com 1:03 pm testing email
I already rebooted httpd, exim, and imap server, and the server itself too.. and problem stills.
How can set a different date (of the system date) on my VPS?
I try with "date -s" but I can't change it.
I need to set up the year to 2004, for a legacy application.
I got report from webceo that I have some issues. May someone help me fix this?
DNS Lookup: 0.22 sec
Connect time: 0.33 sec
Host ping: 0.10 sec
That mean too slow with the other sites!
I can't get access to a certain site. I always get the page with:
network time out - server at *** takes to long to respons. More people have noticed this and apparently it only happens to people with certain specific providers. And not all the time. Some times they DO get access eventy to they belong to the same ISP. So I guess an ISP isn't blocking access to it otherwise it would be permenantly/The site administrator insists that certain ISP's are blocking his site. He's hosting it on his own server. The domain belongs is registered at namecheap.com.
If an ISP is blocking this site (if that's possible?), that would lead to that 'network timeout' page wouldn't it?
What is the most likely reason for getting a timeout page anyway?
I had a big scare today. My server (vps) went down and I had no way of contacting my provider because their whole system had crashed.
I've got backups but I had never thought of a provider crash, so I left the backups on my server. I would like to keep an up-to-date backup on my computer at home.
How do I do this? I've heard of rsync, but I don't know what it is or how it works.
to change system date back and forth.
Of course 'date -s' doesn't work on VPS. Using zic and timezones > /etc/localtime could help up to (almost) 24 hours, but dates are out of range.
Some systems can enable something like defying "Time Drift" as on some Xen versions (as shown below), but unfortunately my provider apparently doesn't support it.
# set independent_wallclock
# echo 1 > /proc/sys/xen/independent_wallclock
Is there any other way to change date on a VPS?