Here is a simple lamp install script for CentOS 8. #!/bin/bash #update system dnf update #install apache dnf install httpd httpd-tools -y systemctl enable httpd systemctl start httpd systemctl status httpd #update firewall firewall-cmd –permanent –zone=public –add-service=http firewall-cmd –permanent –zone=public –add-service=https firewall-cmd –reload #install mariadb dnf install mariadb-server mariadb -y systemctl start mariadb systemctl enable ..
How to import a very large SQL dump file (6 Gb) to a MySQL database using windows command line. If you are using linux it is the same. The process is the following: Open a command prompt (or shell in Linux) with administrative privilleges Connect to a mysql instance using command line: # mysql -h ..
I am using mariadb and I to investigate some issue I wanted to check the logs. To my surprise, log file is not generated for mariadb. I suspect this cannot be the case so I am doubting my search skills. MariaDB [(none)]> show variables like ‘log_error’ -> ; +—————+——-+ | Variable_name | Value | +—————+——-+ ..
Here is how to quickly Determine which Mysql configuration file is being used $ which mysqld /usr/sbin/mysqld $ /usr/sbin/mysqld –verbose –help | grep -A 1 “Default options” Default options are read from the following files in the given order: /etc/mysql/my.cnf ~/.my.cnf /usr/..
Error when exporting a dump in plesk databases (See:https://docs.plesk.com/en-US/onyx/reseller-guide/website-management/website-databases/exporting-and-importing-database-dumps.69538/): Warning: Using unique option prefix database instead of databases is deprecated and will be removed in a future release. Please use the full name instead. Cause key_buffer and myisam-recover are deprecated in Mysql 5.5. myisam-recover option is renamed as of MySQL 5.5.3 to myisam-recover-options . Resolution ..
Recently I ran a command in mysql that resulted in this error: mysql: [ERROR] unknown variable ‘sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’ So I had to add a line to the mysql config file. In Ubuntu 16: # nano /etc/mysql/mysql.conf.d/mysqld.cnf Add the following line under mysqld [mysqld] sql_mode = “STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” Restart mysql: # systemctl res..
Here is the original /etc/my.cnf file for a default mariadb installation: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file ..
The basic formulas are: Available RAM = Global Buffers + (Thread Buffers x max_connections) max_connections = (Available RAM – Global Buffers) / Thread Buffers To get the list of buffers and their values: SHOW VARIABLES LIKE ‘%buffer%’; Here’s a list of the buffers and whether they’re Global or Thread: Global Buffers: key_buffer_size, innodb_buffer_pool_size, innodb_log_buffer_size, innodb_additional_mem_pool_size, ..
Do you wonder which databases are actually taking up how much space but only have one huge ibdata1 in your /var/lib/mysql and the directories inside your mysql data directory don’t represent the actual database sizes? Run from a mysql root console: mysql> SELECT table_schema AS “Database name”, SUM(data_length + index_length) / 1024 / 1024 AS ..