Archive for the tag 'server'

ERROR 2006: MySQL Server has gone away

When trying to load a large SQL dump, I get ERROR 2006: MySQL Server has gone away.

Version 5.0: http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
Version 5.5: http://dev.mysql.com/doc/refman/5.5/en/gone-away.html

Most likely, you will need to restart mysqld with the -O max_allowed_packet=# option.

A communication packet is a single SQL statement sent to the MySQL server, a single row that is sent to the client, or a binary log event sent from a master replication server to a slave.

The largest possible packet that can be transmitted to or from a MySQL 5.1 server or client is 1GB.

Plesk - how do I enable remote access to MySQL database server?

Sometimes you need to provide the remote access.

Open /etc/my.cnf and make sure that the following lines exists/commented in [mysqld] section:

[mysqld]
port = 3306
bind-address = 10.10.0.1
# skip-networking

Restart MySQL. Now you should grant access to remote IP address, login to Mysql:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql

For example if you want to allow access to database called ‘foo’ for user ‘bar’ and remote IP 192.168.0.1 then you need to type following commands at “mysql>” prompt:

mysql> GRANT ALL ON foo.* TO bar@’192.168.0.1′ IDENTIFIED BY ‘PASSWORD’;
mysql> REVOKE GRANT OPTION ON foo.* FROM bar@’192.168.0.1′;

Reference: http://kb.parallels.com/

Parallels Plesk Panel Server backup repository

Server backup repository location.

As of Parallels Plesk Panel version 9.0, the structure and location of the server backup repository have both changed.
The root backup directory is now stored in the file /etc/psa/psa.conf, while it is still set by the variable DUMP_D as before:

Backups directory

DUMP_D /var/lib/psa/dumps

Server backups, backups of resellers, clients, domains, and daily MySQL dumps are now stored in this directory.

How to verify Apache web server status - Parallels Plesk Panel for Linux/Unix.

The name of Apache 2 binary on Debian and SuSE OSes is “apache2,” not “httpd” as it is on Red Hat-based Linux distributions or FreeBSD.

# ps ax | grep httpd | grep -v grep

If not, try to start Apache from Plesk CP or via command line. If you get an error, check /var/log/httpd/error_log (/var/log/apache2/error_log on SuSE and Debian, /usr/local/psa/apache/logs/error_log on FreeBSD)

Make sure that Apache is listening on the both HTTP and HTTPS ports (80/443) on all needed IP addresses:

# netstat -l | grep http
tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:https *:* LISTEN

Stealth Servers common DNS server setups

Common DNS server setups (used when working with zones for registered domain names), Stealth Primary and Stealth Secondary. These are effectively the same as Primary and Secondary DNS servers, but with a slight organizational difference.

For example, you have 3 DNS servers; A, B and C.

A is the Primary, B and C are secondaries.

If you configure your registered domain to use A and B as your domain’s DNS servers, then C is a Stealth Secondary. It’s still a secondary, but it’s not going to be asked about the zone you are serving to the internet from A and B

If you configure your registered domain to use B and C as your domain’s DNS servers, then A is a stealth primary. Any additional records or edits to the zone are done on A, but computers on the internet will only ever ask B and C about the zone.

Next »