For all you Ubuntu/MySQL developers out there, have you ever seen the following?

neo@thematrix:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld <strong>[fail]</strong>
* Starting MySQL database server mysqld [ OK ]
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: '<strong>Access denied for user 'debian-sys-maint'@'localhost'</strong> (using password: YES)'

So, what is this “debian-sys-maint” user?  Well, this MySQL user is created for the Ubuntu to be able to start/stop the database and to carry out other maintenance operations.

Sounds well enough, but then why do I keep running into the “access denied” problem for this user?  Well, the issue is that with each update to MySQL, the user’s password in the database is overwritten.  Ubuntu seems to go to the file/etc/mysql/debian.cnf in order to find this user’s password, but obviously the password is out of sync after the update has been applied.

As a result of this behaviour, I’ll run into the “access denied” problem every so often.  Thankfully, the solution to this issue is fairly simple.

First, list the contents of the /etc/mysql/debian.cnf file:

neo@thematrix:~$ sudo cat /etc/mysql/debian.cnf

The contents of the file should look something like the following:

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
<strong>password = n4aSHUP04s1J32X5</strong>
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user     = debian-sys-maint
<strong>password = n4aSHUP04s1J32X5</strong>
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

See that password?  That’s what we’re looking for!

Next, we want to issue a command to MySQL that tells it to grant the debian-sys-maint user all necessary privileges using the new password.

Login to your mysql server using your root account and the root password you had originally set:

neo@thematrix:~$ mysql -u root -p <password>

Issue the GRANT command now to grant those permissions:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'n4aSHUP04s1J32X5';

Voila!  If you restart MySQL, you’ll find that you should no longer be getting the “access denied” error message.

neo@thematrix:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

Bear in mind, because we just switched the password, and the change hasn’t been affected yet, you may need to kill the MySQL server processes in order to get MySQL to shut down at all.

1

Для того чтобы настроить  время и  часовой пояс в  Debian запускаем команду

# dpkg-reconfigure tzdata

В открывшемся меню выбираем географический район (Европа)

 

Далее выбираем город (Москва)

sity

 

После чего промеряем текущую дату и время

# date

 

 

Ставим Unbound:

sudo apt-get install unbound

После установки перечитываем конфигурационный файл

cat /etc/unbound/unbound.conf

если та есть строка

include: "/etc/unbound/unbound.conf.d/*.conf"

то добавляем новый файл конфигурации

# mcedit  /etc/unbound/unbound.conf.d/local.conf

со следующим содержимым:
Continue Reading

Прежде всего мы создадим приватный ключ и файл запроса на сертификат для сервера OpenVPN, а также получим по созданному запросу в удостоверяющем центре CA подписанный сертификат. В результате у нас появятся файлы server.crt и server.key. Далее займемся остальными файлами, перечисленными в табл. 3.
 Continue Reading