ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
Category Archives: Hosting
ERROR 1410 (42000): You are not allowed to create a user with GRANT
If you have some issue on MySQL 8 database:
CREATE USER 'user'@'localhost' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON user.* TO 'user'@'localhost' WITH GRANT OPTION;
Your password does not satisfy the current policy requirements
SET GLOBAL validate_password.policy=LOW;
Link to database cannot be established: SQLSTATE[HY000] [2002]
Try replace database host name from localhost to 127.0.0.1
Unknown Reason The server encountered an internal error or misconfiguration and was unable to complete your request
Unknown Reason The server encountered an internal error or misconfiguration and was unable to complete your request
You should try use: ProxyErrorOverride off
ispconfig install php 5.6
mkdir -p /opt/php-5.6
mkdir /usr/local/src/php5.6-build
cd /usr/local/src/php5.6-build
wget http://de2.php.net/get/php-5.6.33.tar.bz2/from/this/mirror -O php-5.6.33.tar.bz2
tar jxf php-5.6.33.tar.bz2
./configure --prefix=/opt/php-5.6 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl=/opt/openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
make
make install
cp /usr/local/src/php5.6-build/php-5.6.33/php.ini-production /opt/php-5.6/lib/php.ini
cp /opt/php-5.6/etc/php-fpm.conf.default /opt/php-5.6/etc/php-fpm.conf
ispconfig install 5.4
apt-get update
apt-get install -y libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev libxml2-dev zlib1g-dev libcurl4-gnutls-dev libjpeg-turbo8-dev libbz2-dev libjpeg-dev libfreetype6-dev libmcrypt-dev libcurl4-gnutls-dev
ln -s /usr/include/x86_64-linux-gnu/curl curl
cd /usr/local/include
mkdir /opt/php-5.4.45
mkdir /usr/local/src/php5
cd /usr/local/src/php5
wget http://de2.php.net/get/php-5.4.45.tar.gz/from/this/mirror
mv mirror php-5.4.45.tar.gz
tar -xzvf php-5.4.45.tar.gz
cd php-5.4.45
./configure --prefix=/opt/php-5.4.45 --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-mbstring --enable-sockets --enable-exif --enable-bcmath --enable-calendar --enable-zip --enable-ftp --enable-gd-native-ttf --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir --with-zlib --with-zlib-dir --with-bz2 --with-mcrypt --with-mhash --with-pcre-regex --with-libxml-dir=/usr --with-xmlrpc --with-xsl --with-mysql --with-libdir=/lib/x86_64-linux-gnu --with-curl
make
make install
enable webp support in php GD library
If you are using directadmin and want enable webp support (Centos OS)
yum install libwebp-devel
vi /usr/local/directadmin/custombuild/custom/fpm/configure.php71
--with-webp-dir=/usr/lib64
./build php
If you have php 5.6 so use --with-vpx-dir
php -r 'var_dump(gd_info());' array(12) { ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPEG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["WebP Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
If you do not use fpm, so:
./build used_configs | grep configure.php
PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php56
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php56 custom/ap2/configure.php56
Unix.Trojan.DDoS_XOR-1 FOUND removal
If you find something running like /usr/bin/sywhksydor
or other strange name
You need check and remove /etc/crontab:
*/3 * * * * root /etc/cron.hourly/gcc.sh
then remove form init.d:
find /etc/ -name “*sywhksydor*” | xargs rm -fv
check if no more files created in similar time:
find /etc -mtime -3 -type f -print
Remove cron files:/etc/cron.hourly:
gcc.sh
wqcpplwrlsfby.sh
Remove /lib/libudev.so file
This should be enough, but you need keep monitor server and find the reason of the issue. In my case it was Magento:
$swvJgN7=”xQC+BaIOTBpEqTcQblQx5josN1zjqjFvNxlbbYnZNehr6bIY+iP6cwGBxTaHM7+pt5hmf2i/O4aEgvfCRfdJlMGS9RF0N5b83JCApZWFy0NHCplDxGRW3SxW0wZE142Nmf+7FgrnSoIQbmGT5MtwMBPKSMwd/iJG/YimplO02wgCM10Ivq1EtfgoP+AWezctDmP46MXr8Wwa+bgP6MMpmN5T/Yvoi22WXkzhBHd8BZvIXRoIsUADqgfvefeS3TlHavJw9VtGmBdzmU+o21+AZvXDVEK6EKSIi+R7VoiBpdhJTUstir45aKFjjBj4LdR0R/3dEzoNVQRLOmGpil9DqU6Mf1ELgyKywwxZUwOne2qLh3B/qdltngudFA0s8Abgo8gezeRq2i01pSA4MywmLEaJze7k2eJ4TWjgVurEYKKIIMHbtJhlPWOJUMswpVDHRqcsImkiHb4xEI2CBlwwNCdlKRs6eCapeVknqp3tzMzgUTqEg01/pQ7Gy7TE6HAXjlrmvN
cpanel user login list
grep -r username /usr/local/cpanel/logs/access_log | grep login
strace httpd debug
strace -f $(for i in `ps aux | grep http | awk ' { print $2 }'`; do echo -n "-p $i "; done) $@ | tee /tmp/http_output
Sometimes helps to debug slow web
Policy server HTTP error: 500 Internal Error Temporary internal error: retry timeout exceeded
dovecot: auth: Error: policy(?,xx.xx.xx.xx): Policy server HTTP error: Connection lost: read(127.0.0.1:579) failed: EOF (Request queued 2.784 secs ago, 1 attempts in 2.784 secs, 2.784 in other ioloops, connected 21.780 secs ago)
This error is caused by cPhulkd of cPanel, so you can temporally disable it, while investigating.
Than check for errors:
/usr/local/cpanel/logs/cphulkd_errors.log
/usr/local/cpanel/logs/cphulkd.log
LMTP error after RCPT TO – Temporary internal error: retry timeout exceeded
LMTP error after RCPT TO:
451 4.3.0
dovecot: lmtp(5768): Error: fchown(/home/user/mail/domain.com/info/maildirsizesrv.domain.com.5768.87dedd4b02379106, group=12(mail)) failed: Operation not permitted (egid=507(user), group based on /home/user/mail/domain.com/info – see http://wiki2.dovecot.org/Errors/ChgrpNoPerm)
lmtp(6918): Error: safe_mkstemp(/home/user/mail/domain.tld/info/maildirsize) failed: Operation not permitted
Its cPanel issue, so you cha try update [email protected] mailbox quota to new: Allocated Storage Space
phpmyadmin session_start(): open(SESSION_FILE, O_RDWR) failed: Permission denied (13)
chmod 1777 /var/lib/php/session
mysql find database size
mysql -e 'SELECT table_schema 'Database Name', SUM(data_length + index_length) 'Size in Bytes', ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) 'Size in MiB' FROM information_schema.tables WHERE table_schema = 'some_database';'