Change the default value in MySQL columns

I’ll give an example of specifying or changing the default value in the MySQL column.
Let’s see the list of tables in the database:

SHOW TABLES;

Let’s see the structure of the table we are interested in:

DESCRIBE internet_main;

Let’s say the activate column has the type date and the default value is 0000-00-00, and we want to make 3000-01-01, then we will execute sql query:

ALTER TABLE internet_main ALTER activate SET DEFAULT '3000-01-01';

You can also delete the default value:

ALTER TABLE internet_main ALTER activate DROP DEFAULT;

Or return it as it was:

ALTER TABLE internet_main ALTER activate SET DEFAULT '0000-00-00';

In strict mode MySQL can not set the value 0000-00-00, so you can temporarily disable the strict mode:

SET sql_mode = '';

Ip-up and ip-down scripts with ipset for Accel-ppp

I’ll give an example of the scripts I used before, in the allowip list IP addresses were added to which the Internet is allowed, and in denyip those were redirected to the http page with information about the negative deposit.

Continue reading “Ip-up and ip-down scripts with ipset for Accel-ppp”

The solution of 80070020 error on Nokia Lumia 530

I noticed once a mistake when installing the application on the Nokia Lumia 530 (RM-1017):

There is a problem completing your request.
Please try again later.
Error code: 80070020

The reason for the error was the wrong date and time, before this error on the phone the battery was removed and they dropped.

So I manually specified the date and time in “Settings” – “Date+Time”, after which the error no longer appeared.

ABillS + FreeRADIUS + Accel-PPP only issue one DNS

Once after installation ABillS + FreeRADIUS2 + Accel-PPP (ipoe) noticed that for DHCP clients receive only one DNS server.
Access-Accept from FreeRADIUS was this:

Sending Access-Accept of id 1 to 127.0.0.1 port 57481
        Session-Timeout = 604800
        PPPD-Downstream-Speed-Limit = 51200
        Framed-IP-Netmask += 255.255.255.0
        Framed-IP-Netmask += 255.255.255.0
        Acct-Interim-Interval = 600
        DHCP-Domain-Name-Server += 8.8.8.8
        DHCP-Domain-Name-Server += 8.8.4.4
        PPPD-Upstream-Speed-Limit = 51200
        Framed-IP-Address = 172.20.20.20
Finished request 40.
Continue reading “ABillS + FreeRADIUS + Accel-PPP only issue one DNS”