Roots Discourse

Providing MySQL access to secondary database user

I’m trying to set up Linode Longview on a Trellis-provisioned server- I’ve got system metrics reporting and got the Nginx config up and running (thanks to @fullyint) but I am hitting a wall setting up the Longview App for MySQL extension. The installation instructions request I make a new database user with password access but I’m unable to login after creating the user, which I believe is probably due to something in the Trellis security configuration.

I added the new user “linode-longview” per the Longiview MySQL Manual Installation instructions:

$ sudo -s
$ mysql
MariaDB [mysql]> CREATE USER 'linode-longview'@'localhost' IDENTIFIED BY '***************';
MariaDB [mysql]> flush privileges;

but when I try to access the report page or log via the terminal using mysql -u linode-longview -p I get:

Unable to connect to the database: Access denied for user 'linode-longview'@'localhost' (using password: YES)

I’m hoping someone who has a more holistic understanding of the Trellis security setup can help me out with this… Thanks!

Nothing I can think of should prevent this. Trellis restricts external port access, but this is all on the same server.

I just tried this on a new dev VM and it worked as expected.

1 Like

Thank you :pray: sir for looking into this! If not only for the positive confirmation that it “should” work. I’ll try working at it some more, it’s just so debilitating when you don’t know enough about what is a bug and what is a feature to pin down where the point of failure is :relieved:. Thanks for taking the time to investigate

Hey Gnowland - check your
/etc/linode/longview.d/MySQL.conf

Make the password in that file the same for the linode-longview user in your db.

1 Like