Posts

Showing posts from 2019

mysql Row size too large

innodb_log_file_size = 512M innodb_strict_mode = 0

Field 'po_qnty' doesn't have a default value

As others said, this is caused by the   STRICT_TRANS_TABLES   SQL mode. To check whether  STRICT_TRANS_TABLES  mode is enabled: SHOW VARIABLES LIKE 'sql_mode' ; To disable strict mode: SET GLOBAL sql_mode = '' ; But the next time MySQL restarts, these settings are lost. It should be: [ mysqld ] sql_mode = NO_ENGINE_SUBSTITUTION , STRICT_TRANS_TABLES instead of [ mysqld ] sql_mode = "NO_ENGINE_SUBSTITUTION" then restart mysqld service.

How to fix the sys.host_summary table in MariaDB

The sys schema is not bundled with 10.3, but  seems to be planned for 10.5 . If you don't use/need it, you can safely remove it:  DROP DATABASE sys; . If you do need it, you need to try resolving the issue outlined in the error message. For a start you can do  SHOW CREATE VIEW sys.host_summary;  to see which tables, views and functions it's referencing, as well as the definer/invoker. DROP DATABASE sys;

Directory structure for directadmin

Directory Structure of DirectAdmin Explained About Control Panels A web hosting control panel is a web-based interface that allows the administrator to manage the websites easily, and it is also very helpful for customers to easily manage their server even without any technical knowledge. There is so many types of control panels are available, such as: 1) DirectAdmin 2) cPanel 3) Plesk 4) Webmin Directory Structure The organization of files into a hierarchy of folders is known as the directory structure. The directory structures is modeled after the hierarchical tree model. Let’s take a closer look at the DirectAdmin directory structure in detail. Apache /etc/httpd              – Apache /etc/httpd/conf/         – Configuration files are stored in this directory /etc/httpd/conf/ssl.crt/    – SSL certificates are stored here /etc/httpd/conf/ssl.key/   – SSL certificate key stored here /etc/httpd/conf/extra/    – Contains virtual hosts /var/log/httpd/  

mariadb db username length increase

Login to mariadb use mysql; ALTER TABLE mysql.user MODIFY  `User` varchar(30) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''; SHOW COLUMNS FROM mysql.user;

directadmin distribution mail not going

This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:   pipe to |/etc/virtual/majordomo/wrapper resend -C /etc/virtual/hrworksindia.com/majordomo/majordomo.cf -l it_team -h hrworksindia.com -f owner-it_team  it_team-out@hrworksindia.com     generated by  it_team@hrworksindia.com     local delivery failed Reporting-MTA: dns; india.drushti.net Action: failed Final-Recipient: rfc822;|/etc/virtual/majordomo/wrapper resend -C /etc/virtual/hrworksindia.com/majordomo/majordomo.cf -l it_team -h hrworksindia.com -f owner-it_team  it_team-out@hrworksindia.com Status: 5.0.0 check  /etc/virtual/majordomo drwxr-x--- 5 majordomo daemon  4096 Jul 29  2011 majordomo [root@india majordomo]# ll total 324 -rwxr-xr-x 1 majordomo daemon  5267 Jul 29  2011 archive2.pl drwxr-xr-x 2 majordomo daemon  4096 Jan 29  2005 bin -rw

Show All Users in DirectAdmin is Missing Users

You may find that upon creating a new account, DirectAdmin's Show All Users sections don't show the recently added user. This is simply due to caching.  1)  The show_all_users.cache will be re-created automatically with the nightly tally, but you can force it to run manually if you'd prefer not to wait. The cache file used is located here in case you'd like to confirm that the user is not present in the cache file first: /usr/local/directadmin/data/admin/show_all_users.cache You can regenerate the cache via 2 different methods. The first is via the DATaskQ: echo "action=cache&value=showallusers" >> /usr/local/directadmin/data/task.queue /usr/local/directadmin/dataskq d The second is by simply deleting the show_all_users. cache file and then forcing DirectAdmin to recreate it by loading the "Show All Users" page again.

Directadmin username length increase

max_username_length  in /usr/local/directadmin/conf/directadmin.conf

distribution list restoration

cat /etc/virtual/<domain>/majordomo/lists/<list-name> rsync -avhe 'ssh -p 22' majordomo root@115.112.176.43:/etc/virtual/hrworksindia.com/

Restore database in mysql

A common use of  mysqldump  is for making a backup of an entire database: shell > mysqldump db_name > backup-file . sql You can load the dump file back into the server like this: UNIX shell > mysql db_name < backup-file . sql The same in  Windows  command prompt: mysql - p - u [ user ] [ database ] < backup-file . sql PowerShell C :\> cmd . exe / c "mysql -u root -p db_name < backup-file.sql" MySQL command line mysql > use db_name ; mysql > source backup-file . sql ; got to the folder location backup-file . sql

mongodb

https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/ install MongoDB community edition Configure Remote Access for MongoDB vi /etc/mongod.conf # network interfaces net:   port: 27017   bindIp: 127.0.0.1,164.52.195.243  PHPMyAdmin alternative is MongoDB compass mongodb://127.0.0.1:27017/ mongodb://192.227.112.108:27017 IP:port root@vmi1115207:~# netstat -plunt | grep 27017 tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      6099/mongod tcp        0      0 89.117.56.60:27017      0.0.0.0:*               LISTEN      6099/mongod 89.117.56.60 this is same server where mongodb is installed then telnet connected Uninstall mongoDB from ubuntu sudo service mongod stop sudo apt-get purge mongodb-org* sudo rm -r / var /log/mongodb sudo rm -r / var /lib/mongodb "initandlisten","msg":"\n\n***aborting after fassert() failure\n\n for Linux $ sudo rm -rf /tmp/mongodb- 27017. sock $ sudo service mongod start /var/l

tomcat

tomcat requires java java -version http://164.52.195.243:8080/healyos-pdt/ on port 8080 tomcat runs web directory /var/lib/tomcat/webapps password should be set here in cd /etc/tomcat/tomcat-users.xml uncomment and add password <role rolename="tomcat"/>   <role rolename="role1"/>   <user username="tomcat" password="tomcat" roles="tomcat"/>   <user username="both" password="admin" roles="tomcat,role1"/>   <user username="role1" password="admin" roles="role1"/>  <role rolename="admin"/>  <role rolename="admin-gui"/>  <role rolename="admin-script"/>  <role rolename="manager"/>  <role rolename="manager-gui"/>  <role rolename="manager-script"/>  <role rolename="manager-jmx"/>  <role rolename="manager-status

modsecurity you don't have permission to access /phpmyadmin/import.php

[Thu Dec 26 14:17:31.929092 2019] [:error] [pid 19836] [client 219.91.251.164] ModSecurity: Access denied with code 403 (phase 2). Match of "eq 0" against "MULTIPART_UNMATCHED_BOUNDARY" required. [file "/etc/httpd/conf/extra/modsecurity.d/00_asl_zz_strict.conf"] [line "37"] [id "330792"] [msg "Multipart parser detected a possible unmatched boundary. This may be an impedence mismatch attack, a broken application or a broken connection.  This is not a false positive.  Check your application or client for errors."] [severity "CRITICAL"] [hostname "192.227.108.55"] [uri "/phpmyadmin/import.php"] [unique_id "XgRzo8Hz@CX9it2euowINQAAABA"] [Thu Dec 26 14:17:31.929314 2019] [:error] [pid 19836] [client 219.91.251.164] ModSecurity: Audit log: Failed to create subdirectories: /var/asl/data/audit/20191226/20191226-1417 (Permission denied) [hostname "192.227.108.55"] [uri "/phpmyadm