NeDi Community

NeDi Software Specific => Installation => Topic started by: johnm on February 28, 2018, 07:33:04 pm

Title: Mysql error with nebuntu.sh fresh install of ubuntu 17.10.1
Post by: johnm on February 28, 2018, 07:33:04 pm
nebuntu.sh completes fine except for the following error.  I'm executing script as normal user with sudo command sudo ./nebuntu.sh, also the admin page is not loading.

Initialize NeDi DB!!!
------------------------------------------------------------------------
DBI connect('dbname=mysql;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /var/nedi/inc/libdb.pm line 37.
Enabling SNMP latency measurement
Enabling snapshots
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Title: Re: Mysql error with nebuntu.sh fresh install of ubuntu 17.10.1
Post by: rickli on March 03, 2018, 02:58:15 pm
Looks like mariadb (mysql) doesn't like the sudo part. I've written the script to be executed by root. Can you retry as root? You could configure this part manually , if not:

As dbadmin/root:
UPDATE mysql.user SET plugin='' WHERE user='root';
SET PASSWORD = PASSWORD('dbpa55');
FLUSH PRIVILEGES;

This mysql plugin is a recent change. While it might be a good thing for some users, I find it rather cumbersome since a regular user cannot do "mysql -u root -p" anymore :-(