Zabbix remote server availability unknown and mysql template not showing - mysql

I want to monitorize a remote server on zabbix. The server would be the host and then mysql, rabbitmq... would be created as templates. The first problem is that the availability on the server is unknown. The IP address is the correct one: Image of the hosts on zabbix as you can see on the image, the zabbix_agent host is okay but the other host is unkwnown.
There is another problem. i have configured mysql on the remote server with all the files. (userparameter file and .my.cnf file) but I don't see any data on "Latest Data".
Latest data mysql I don't know why it does not show any data. The template of mysq is configured like this: template configuration
Thank you for your help

Related

Mysql can not load local files

Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server sides
show variables like 'event_scheduler'; // this is ON.
I saw a answer is set
OPT_LOCAL_INFILE=1;
but I did not find where can set it.
The file must be at the directory on the server. If you're using MySQL on Windows and the client is running in the same computer, it is no difference, but if your server is on the remote computer, you need the way to put the file in the server, not on the client directory.

How do I connect a to a mysql database hosted on pythonanywhere?

I have bought a basic 6$ pythonanywhere server which allows for SCP and SSH connections to their servers. I have deployed my flask application (REST API) to the server and set up a local environment (installed packages, set up path and environmental variables). I ran the app, and it gives me the 404 page on the / route which is actually a sign that it is working.
However when I try to hit a route like /api/users/3 for example, it gives me an error 500 (internal server error). I dug around some log files on the server and found one which is basically the output of the WSGI web server which is host to my flask application. It said that there is an issue with the database communication. From what I understand, it connected successfully but it couldn't query the data from the table:
(1044, "Access denied for user 'secret_username'#'%' to database 'test'")
I have tried to fix this through the web mysql console by giving my <secret_username>#secret_username.pythonanywhere.com all the privilages to test.*, but it gives me an access error once again. I tried to SSH into the machine that is host to the mysql server and tried to connect to it - secret_username.mysql.pythonanywhere-services.com but it doesn't allow me to ssh into this server.
Has anyone experienced this issue? I am almost sure that my connection is set up correctly because if it didn't establish connection it would give me an access error with message `using password "yes". I've read on forums a bit, they suggest installing a mysql server on the same server as the flask application, but I don't have access to sude for some reason, probably due to my cheap plan. Any ideas?
If you are using the MySQL database provided by PythonAnywhere, with the hostname secret_username.mysql.pythonanywhere-services.com, then your database will be called secret_username$test, not just test -- see the "Databases" page on the PythonAnywhere website.

How to access my newly setup MySQL database (getting "Domain is currently unable to handle this request.")

I just set up a new MySQL database with the MySQL workbench & created a user for it with all necessary privileges. I am using this database for use with my php code. But I can't seem to connect to it on my live server (pages are hosted on windows server 2012). Everything works fine in my local environment with xampp and the new MySQL database is exactly the same as the xampp one. I think I am maybe using the wrong host name or something. As host name I copied the name that is displayed after "Host:" when you click on Server Status in MySQL workbench. The database name, user & password should all be correct. But when my code tries to access the db I get a "The domain page isn’t working. Domain is currently unable to handle this request."
You either have no network connection to the server at all or it is blocked due to firewall or routing misconfiguration.
If you do have network access in general, you might forgot to
FLUSH PRIVILEGES;
or you have not enabled networking over TCP, the default is to listen only to localhost (on unix systems via unix sockets, on microsoft I guess it's simply TCP).
Read about the following configuration parameter which will solve your networking issue:
bind-address
If you have a very old MySQL server version, the parameter is enable-networking but it shouldn't be the case anymore.

Connection to MySQL server fails

I'm trying to access a database from the default Linux MySQL client, but all I get is a timeout. It's actually the database used by a WordPress website, and in the configuration file I can see that the IP address of the DB server is actually localhost (127.0.0.1). So I assume that the host name of the DB server is the same as the website's.
I am able to connect to the database with a PHP script that I wrote and uploaded to the server with this same information, and with the show variables query I was able to verify the port number (which was 3306) and specify it to the client. I can see a lot of variables but I'm not sure which one to use.
Any help?
If your Wordpress site is remote, you must connect to DB server like remote connection not local connection. If wordpress and DB server are in the same server, the configuration file to connect with DB is localhost, but if you want connect from remote host you must config your connecto with remote data.

Can't connect to database

Actually I'm having more than one problem...but all of it has to do with connecting or working with the MySQL database...First you can see one of the errors on my website and no matter what you choose it seems to just say it can't connect to the database...I've configured a configure.php file to allow files to connect to the MySQL database...see the website here:
http://netsurfer123.byethost11.com/index.php
Then when I try to log-in to the Admin area of my MySQL database it just says:
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
Please let me know what I can do to correct these errors...and thanks very much in advanced for any helpful response/s.
First you need to check if the MySQL server is actually running. Use a command such as
/etc/rc.d/init.d/mysqld status
Or similar for your system if possible.
Did you check the web server log file? Does it contain errors as indicated by phpMyAdmin?
Your site is simply unable to connect to the database to which it's trying to connect. This could be for any number of potential reasons:
Is the database running?
Is the database accessible by that machine? (Maybe there's a firewall in between the two servers, if they're separated?)
If the database is on that same machine, are you connecting to it properly? (Maybe it allows only certain connection methods, such as a socket vs. the loopback address?)
Is your connection string correct? Maybe the login is failing?
Check your PHP logs, your Apache logs, your MySQL logs. One of them is complaining about something and it's probably trying to tell you what.