MySQL time zone different from system time zone

the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven’t started MySQL to cause it to change as well.


$ date
Sun Jul  1 11:32:56 CDT 2007

mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| system_time_zone | PDT    |
| time_zone        | SYSTEM |
+------------------+--------+
2 rows in set (0.00 sec)

If you find yourself in this situation, just restart MySQL and the situation should be fixed:


mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| system_time_zone | CDT    |
| time_zone        | SYSTEM |
+------------------+--------+

Addon – check mysql time

mysql> select NOW();
+---------------------+
| NOW() |
+---------------------+
| 2014-06-20 19:07:05 |
+---------------------+
1 row in set (0.00 sec)

I get this message in plesk. I’m not sure how to fix the errors

New files of configuration for Apache web server were not built due to errors in configuration templates: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf:

Sometimes this has something to do with the config generation and it can give you more info if you try running the reconfiguration from the commend line.

You can do this by running

/usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair

And


/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Plesk 10 and later versions:


# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain <domain_name>

Plesk 9 and earlier versions:


# /usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>

Note: Replace with the actual domain name.

If the issue occurs for all domains, you could run this command:

Plesk 10 and later versions:


# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

Plesk 9 and earlier versions:


# /usr/local/psa/admin/bin/websrvmng --reconfigure-all

Failed to update Panel. To solve this problem, you can send the update log to Parallels support. View the update logs (June 18, 2014). View the update logs (June 19, 2014). Copy the logs to your computer before you close this message. To close this message, click here.

Plesk log shows:

ERROR: Failed to run the Yum utility.
The Yum utility failed to install the required packages.
Attention! Your software might be inoperable.
Please, contact product technical support.

Resolution:

Check for the atomic repo and disable it.

cd /etc/yum.repos.d/
nano atomic.repo
# Name: Atomic Rocket Turtle RPM Repository for CentOS / Red Hat Enterprise Lin$
# URL: http://www.atomicrocketturtle.com/
# Note: This isn't covered by ASL support. -Scott
[atomic]
name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com
mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-6-$basearch
#mirrorlist = http://www.atomicorp.com/channels/atomic/centos/6/mirrors-atomic
enabled = 1
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
gpgcheck = 1

Set enabled = 1 to enabled = 0
Then run:


yum update --enablerepo=atomic atomic-release

This should resolve the error.

Or…

/usr/local/psa/admin/sbin/autoinstaller --select-release-current --reinstall-patch --install-component base

or…


yum upgrade atomic-release 

Other resources: http://kb.odin.com/en/116189

A user could not show the public_html directory on a cpanel server. Run the following to see how many files are listed in the directory.

cd /home/username
ls|wc -l
10050

This folder has 10500 files. The settings for ftp do not allow a full directory listing. We removed the files that were not needed and ftp worked.

Also this is a setting in /etc/pure-ftpd.conf

nano /etc/pure-ftpd.conf
# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion 10000 8

To change this – change the line amount in the first number and restart ftp

LimitRecursion 11000 8
service pure-ftpd restart

To change the ftp maximum number of files on plesk.

nano /etc/proftpd.conf
ListOptions -a maxfiles 2000 maxdepth 3

Restart xinetd

 service xinetd restart

This configures the -a option by default, and limits the maximum files in the generated listing to 2000. If the client uses the -R option, proftpd will not recurse into directories more than 3 levels deep when generating the listing.

To change the ownership of files and folders in a directory. For a plesk httpdocs directory that runs fastcgi. For apache – you will want to change this to apache:apache.

Change directory

cd /var/www/vhosts/domain.com/httpdocs

Find who owns the files and folders.


ls -la
[root@austin httpdocs]# ls -la
total 20
drwxr-xr-x  3 mungoadmin psacln 4096 Jun 11 14:16 .
drwxr-xr-x 22 mungoadmin psacln 4096 Jun 11 14:13 ..
drwxr-xr-x  2 root       root   4096 Jun 11 14:16 anotherdir
-rw-r--r--  1 root       root      6 Jun 11 14:14 test1.txt
-rw-r--r--  1 root       root     10 Jun 11 14:15 test2.php

You see that some files/directories are owned by root:root an some by mungoadmin:psacln. We will want to change this to be the ftp user in plesk – which is mungoadmin:psacln.

To change this run the following (Warning – make sure you are in the directory you want to change all the files/directories in):

[root@austin httpdocs]# chown -R mungoadmin:psacln *

Now – look at the changes

[root@austin test]# ls -la
total 20
drwxr-xr-x  3 mungoadmin psacln 4096 Jun 11 14:16 .
drwxr-xr-x 22 mungoadmin psacln 4096 Jun 11 14:13 ..
drwxr-xr-x  2 mungoadmin psacln 4096 Jun 11 14:17 anotherdir
-rw-r--r--  1 mungoadmin psacln    6 Jun 11 14:14 test1.txt
-rw-r--r--  1 mungoadmin psacln   10 Jun 11 14:15 test2.php


I know the post is a little old, but it seems that many people are having issues with federated engines.

When the mysql binaries are installed via yum, you already have the HA (High Availability) plugins. You simply need to load the plugins within the mysql CLI.

Here is the basic process:

Start mysqld if it is not already started. Make sure ‘federated’ is NOT in /etc/my.cnf at this point.

EX: At this time, /etc/my.cnf will look like this from a standard YUM install….


[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

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Log into the mysql CLI with root (or another account with sufficient privilege).

Type: show engines;

You should see no FEDERATED engine at this point, like this:


mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance     | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)

To enable the federate engine, type the following:


install plugin federated soname 'ha_federated.so'

NOW, when you ‘show engines’ you will see the FEDERATED Engine, but turned off…

It will look like this:


mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| FEDERATED  | NO      | Federated MySQL storage engine                             | NULL         | NULL | NULL       |
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance     | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)

You can now safely add the line ‘federated’ to the /etc/my.cnf file like this:


[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
federated

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Restart mysqld (service mysqld restart, etc…)

After the restart, go back in to the mysql CLI.

Type show engines;

You should now see the FEDERATED Engine available and with SUPPORT as YES.


mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| FEDERATED  | YES     | Federated MySQL storage engine                             | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance     | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)

And you are done…go forth and create federate tables…

Good luck!

On ML with the MySQL 5.5 (current) all I needed to do was:

Copy one of the existing files from /usr/local/mysql/support-files/ to /etc/my.cnf
Add ‘federated'(without quotes) to the [mysqld] section (not the end of the my.cnf file)
Restart MySQL

Instructions for 32 bit systems:


$ wget -c https://download.jitsi.org/jitsi/nightly/rpm/jitsi-2.5-5314.i686.rpm
$ sudo rpm -i jitsi-2.2-latest.i386.rpm

Instructions for 64 bit systems:


$ wget -c https://download.jitsi.org/jitsi/nightly/rpm/jitsi-2.5-5314.x86_64.rpm
$ sudo rpm -i jitsi-2.2-latest.x86_64.rpm

When changing the email from 100MB to 500 for the emails in the domain the following error:


Incorrect limit value was specified. 

Under the subscription settings, you would need to increase the maximum size for the mailbox. If you attempt to make the limit for a mailbox higher than the current max mailbox setting for the subscription you will encounter that error. If the subscription is owned by a reseller, the reseller limit must also be increased.

Note: If you have plesk panel – check the website for the version of php running. If it is a different version than the standard php installation, create a phpinfo page to check if mcrypt is installed for that php version as a simple “php-m” will just report the standard OS php information.

The first step requires downloading some RPM files that contain the additional YUM repository definitions. The instructions below point to the 64-bit versions that work with our Cloud Server instances.
Centos 5.x


wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Centos 6.x


wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

CentOS 7

# sudo yum install epel-release

Or…

The command is as follows to download epel release for CentOS and RHEL 7.x using wget command:


cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

To install epel-release-7-5.noarch.rpm, type:


# sudo yum install epel-release-latest-7.noarch.rpm


list repos:

# sudo yum repolist

Once installed you should see some additional repo definitions under the /etc/yum.repos.d directory.


$ ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo
/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/remi.repo

Optional
Enable the remi repository

The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services. That means it generally is not a bad idea to enable the remi repositories by default.

First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:


# sudo vim /etc/yum.repos.d/remi.repo

Edit the [remi] portion of the file so that the enabled option is set to 1. This will enable the remi repository.


name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

You will now have a larger array of yum repositories from which to install.

Now run:


# yum install php-mcrypt


# service httpd restart

For directories

[root@server]# find /var/www/vhosts/domain.com/httpdocs -type d -perm 777 -print

Set to 755:

root@server ]# find /var/www/vhosts/domain.com/httpdocs/ -type d -perm 777 -exec chmod 755 {} \;


For Files

[root@server]# find /var/www/vhosts/domain.com/httpdocs -type f -perm 777 -print

Set to 644:

[root@server]# find /var/www/vhosts/domain.com/httpdocs -type f -perm 777 -exec chmod 644 {} \;