How do I import a Database using PhpMyAdmin in Cpanel
To import we will need the file in .sql format, not compressed .zip or .tar.gz file.
Log into your CPanel and find the link for PhpMyAdmin.
Once in PhpMyAdmin you will see on the left side a drop down of the databases, select the database you would like to import to.
This will create some tabs at the top of the screen, click on SQL.
After clicking on SQL you will see a Text Box area and a file upload option.
Click browse on the file upload option and find your .sql file
After you have selected the file click GO and it will import your database to the server.
How to enable cPanel / WHM /webmail after enabling firewall in Virtuozzo
By default, cPanel’s and WHM’s ports are closed for Virtuozzo. We will need to open them using SSH.
As root, run the following commands:
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2082 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2083 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2086 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2087 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2095 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp –dport 2096 -j ACCEPT
This will opens cPanel with and without SSL, and WHM with and without SSL and webmail ports.
To save the firewall changes, use the following:
/etc/rc.d/init.d/iptables save
To see the firewall rules, type
cPanel VPS Account Creation [an error occurred while processing this directive]
Problem to create a new account on cPanel VPS server.
Create a new Account
[an error occurred while processing this directive] Notification => root@server.net via EMAIL [level => 3]
Account Creation
We need to find out what Cpanel error logs shows
#tail -f /usr/local/cpanel/logs/error_log
edquota: Cannot set quota for user 543 from kernel on /dev/vzfs: No such process
edquota: Can’t write quota for 543 on /dev/vzfs: No such process
To resolve this: We need to raise the quotagidlimit from the resource tab on the hardware node.
PCRE - Perl Compatible Regular Expressions on Cpanel Servers.
The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5.
The latest release of the PCRE library is 8.10. You can download it from its official home via anonymous FTP:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
tar xvzf pcre-8.10.tar.gz
cd pcre-8.10
./configure
make
make install
More at the man page - http://www.pcre.org/pcre.txt
Sometimes we may see the mysql database size as zero in cPanel
This can be fixed as follows: SSH to the server as root and edit the cpanel.config file
vi /var/cpanel/cpanel.config
search for
disk_usage_include_sqldbs=0
and then make change to
disk_usage_include_sqldbs=1
If the parameter is not present, add it. Save the file and execute the following command:
This may take few minutes to get fixed if you have a large number of users with databases, but once done, we should be able see the database disk usage show up accurately in cPanel.