I noticed some errors coming to the root mail with the subject and the text: Cron /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead. The problem lies in the file ~ / .my.cnf, […]
Suppose you need to make the user root can connect to MySQL from localhost without entering a password.
Normally, the parameter max_connections in MySQL is set to 151 and allowed for one connection more, that is, there may be 152 connections. If there are more connections, there will be a “too many connections” error. On an example I use MySQL 5.5.54. To increase the value, we connect to MySQL: Let’s see a list […]
I once found the following error when installing MySQL ODBC Driver 5.3.7:
Once in the FreeRADIUS logs I noticed a MySQL error: Table ‘./radius/radacct’ is marked as crashed and last (automatic?) repair failed As it turned out, the radacct table was damaged, since the data there were not particularly important, then the entire table was cleaned. You can clean up via phpMyAdmin or SQL query: A bit […]
Here is an example of changing the MySQL encoding of a database and tables. Before any actions on important data it is necessary to make a backup copy, for example: For the test, we will connect to MySQL and create a couple of new databases without specifying the encoding and specifying: Create a test table […]
To create a user, we first connect to the MySQL server console: Let’s see what users are: Create a user (where localhost is specified from where the user can connect, you can specify the IP address, localhost – from the local machine where the MySQL server itself, or % from any addresses): If you intend […]
Below are examples of importing and exporting MySQL databases from a Linux terminal. Export the database to a file like this:
I noticed once when importing a sql file the following error: ERROR 1067 (42000) at line 211: Invalid default value for ‘blablabla’ It arises because new versions of MySQL server use strict mode and parameters such as NO_ZERO_DATE do not allow entering date values like ‘0000-00-00’ into the database. Connect to mysql server: Execute a […]
Here is an example of a script written in PHP, for sending SMS messages through the Goip4 gateway. The script receives data from the SQL database with a query and alternately sends SMS to each number, and also writes an entry about sending it to a special sms table.