ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

2011/05/14

How to restore mysql database in linux plesk

You can use the command 'mysql' to restore the database. Exact command is given below.

mysql -u admin -p`cat /etc/psa/.psa/shadow` database_name < database_dump.sql

2011/05/05

Wrong mysql disk usage in cpanel.



You have zero databases in your cpanel account. After login to your cpanel, you can see the mysql database consuming more disk space.  This can be corrected by the following steps.

 Login to server and edit cpanel.config.

[root@server /]# vi /var/cpanel/users/cpanel.config

Replace 'disk_usage_include_sqldbs=0' with  'disk_usage_include_sqldbs=1'

Save this file and run the command given below.

[root@server /]# /scripts/update_db_cache

In the whm-tweak setting, you need to enable the option
'Use INFORMATION_SCHEMA to acquire MySQL disk usage (MySQL 5+ required) '


2009/12/23

Configuration files in cpanel server

Apache:-

/usr/local/apache/ bin->Apache binaries are stored here
/usr/local/apache/conf–>configuration files – httpd.conf
/usr/local/apache/cgi-bin->Cgi bin directory
/usr/local/apache/domlogs–>domain log files are stored here
/usr/local/apache/htdocs->default doucument root of the server
/usr/local/apache/include–>contains header files
/usr/local/apache/modules–>Contains shared object (.so) files
/usr/local/apache/logs–>apache logs contains access_log, errorlog and suexec_log

Exim:-

->/etc/exim.conf – exim configuration file
->/etc/localdomains – list of the domains which are allowed to relay mail
->/var/log/exim_mainlog – exim main log file
-> /var/log/exim_rejectlog – Contains the logs for the rejected mails.
->/var/log/exim_paniclog – Contains exim errors
->/var/spool/exim/input-Mail queue for exim
->/etc/valiases/domainname.com- Email forwarders and catchall.
->/etc/vfilters/domainname.com-Email filter
->/home/username/etc/domainname/passwd-POP authentication file

ProFTPD:-

-> /etc/proftpd-configuration file
->/var/log/messages-ftp logs
->/etc/proftpd/username- All the ftp accounts and password will be listed here.

Pure-FTPD:-

->/etc/pure-ftpd.conf-Pureftpd configuration file.
->/etc/pure-ftpd/ip-address-document root for the anonymous ftp

Mysql:-

/etc/my.cnf->configuration file
/root/.my.cnf->Contains the root password
/var/lib/mysql –Data directory which contains all the MySql databases.

SSHD:-

/etc/ssh/sshd_config->configuarton file
/var/log/messages-> Log file
/etc/banner->Contains the banner to be displayed

Named:-

/etc/named.conf->Main configuration file
/var/named->Directory which contains the db records
/var/log/messages-> Log file

Cpanel Configuration files:-

/usr/local/cpanel-/bin –> cpanel binaries
/usr/local/cpanel/cgi-sys –> Contains cgi files like formmail.cgi etc
/usr/local/cpanel-/base –> phpmyadmin, squirrelmail, skins, webmail etc
/usr/local/cpanel-/logs -> cpanel access log, error log etc
/usr/local/cpanel/ 3rdparty/ –Fantastico,mailman files are located here
/usr/local/cpanel-/addons –> AdvancedGuestBook, phpBB etc
/var/cpanel/users/username – >cpanel user file
/var/cpanel/cpanel.config –> cpanel configuration file.
/var/cpanel/resellers –> Reseller configuration files.
/var/log/dcpumon –> Top log process
/etc/wwwacct.conf –> account creation default file
/etc/cpupdate.conf – >cPanel Updation Config file
/etc/cpbackup.conf –> Backup configuration file
/var/cpanel/bandwidth –> Contains bandwidth usage details of the domains.

Name server and IP configuration files:-

/etc/sysconfig/network –Network configuration files
/etc/hosts->Contains hostname of the server
/etc/resolv.conf –> Resolver Configuration
/etc/nameserverips –>Contains the name server IP details
/etc/ips –>List of all the ip addresses except the shared ip on the server.
/etc/ipaddrpool – >ip addresses which are free
/etc/ips.dnsmaster –> name server ips