How can I change the default phpMyAdmin access URL for AWS EC2 running Linux AMI - mysql

I just installed MySQL and phpMyAdmin on my AWS EC2 instance running Linux AMI. I would like to find out how to change the default URL to access phpMyAdmin, which is currently /phpMyAdmin. I found an article on how to do this:
https://www.tecmint.com/change-secure-phpmyadmin-login-url-page/
but there is no such file: /etc/httpd/conf.d/phpMyAdmin.conf. The only config file I can find is the sample config file: /var/www/html/phpMyAdmin/config.sample.inc.php. But this sample config file doesn't seem to have anything about url alias.
Would appreciate some help on this, thanks!

Related

Zabbix remote server availability unknown and mysql template not showing

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

How to fix db query error: failed to connect to server - please inspect Grafana server log for details

i'm new in Grafana. Im wanted to configure the mysql in grafana as the datasource. But my database is not a local database which is cloud database in mysql. How can i configure that? because i'm trying to configure it say "db query error: failed to connect to server - please inspect Grafana server log for details"
Anyone know how to change that? or how to configure mysql database in grafana (not local database). Please Help. Thank you
error message
Docker host using IP address of your machine follow below steps:
Open the CMD
IPCONFIG /ALL
Look for the IPV4 address under WiFi or
vEtherner, in my case its 192.168.1.24 and 172.45.202.1 respectively
Then try accessing the app hosted in docker container with mapped port (e.g. 1433/5436)
It works on 192.168.1.24:1433 and 172.45.202.1:1433 in the same way to access all container apps hosted using docker

Server unexpectedly closed network connection on AWS EC2

It is a MySQL database server. When I login in AWS management console, it looks normal. But cannot connect to the server from any applications (PUTTY, MySQL clients, etc). Other than create a new instance, any ideas?
You cannot create new instance on aws. You can install phpmyadmin https://www.phpmyadmin.net/downloads/ and just upload it using sftp and extract then access on the browser http://ec2/phpmyadmin_directory_name.
If you are trying to access ssh then you have to create pem key link : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
then add the key to your putty. Thats it.

How to transfer file from one ubuntu server to another ubuntu server?

I am new to servers and currently I am stuck in a problem. I want to transfer a while from one server to another. I am using ubuntu through a putty. Both the servers have a private key. So can someone help me out with this?
Thank you
Putty is windows client. You can use your Windows box and to transfer file/s in two steps: 1. server1 -> your pc and 2. your pc -> server 2.
You can do this with putty (here is a howto) or by using WinSCP (download link)
Your steps should be:
Copy ssh key from Windows machine to source Linux machine.
Configure Windows Putty client to use ssh key upon connections to source Linux machine.
Connect to to source machine.
Run scp command to transfer file to destination Linux machine.
Steps detalization:
It could be done using WinSCP client. This link will help you:https://www.siteground.com/tutorials/ssh/ssh_winscp.htm
Your configuration screen could look like:
It's clear.
Run
scp -i ssh_key_file_with_path source_file_name_with_path username#destination_host:destination_folder
More about scp command http://www.tecmint.com/scp-commands-examples/
Example:
You want to transfer /home/superuser/script.py to 10.62.96.12 server into /var/www folder. You command could look like:
scp -i ~/some_ssh_keys/id_rsa /home/superuser/script.py root#10.62.96.12:/var/www
P.S. Make sure your user have enough rights to access source file and destination folder.
This is works in ubuntu
==> scp "file" "username"#"IP address or hostname":"Destination"
Or just download WinScp and transfer the file to your local m/c and then to the other server.
Try this it will work :
Step 1 :
Login to the server(from where you want to transfer the file to another server) using putty.
Step 2:
Once successfully login to the server then this linux command you have to use :
scp filename (another ubuntu server IP)XX.XXX.XX.XX:/path/
Here,
filename = File name you have to transfer to another server.
XX.XXX.XX.XX = Ubuntu Server IP on which you transfer the file.
path = Specify the Path where you want to transfer the file.
then, you see the message on your terminal :
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '(another ubuntu server IP)XX.XXX.XX.XX' (ECDSA) to the list of known hosts.

MySQL Workbench not connecting over SSH

I installed a server using Laravel Forge. Authentication is via SSH keys which I provided.
I can connect to the server via putty with my private key. Also am able to connect to the mysql using the mysql password.
But when I try to do the same in Mysql Workbench I get this:
My keys are in .ppk format. The keys don't have a password.
I have no idea what to do. Please assist.
I don't know if that applies here, but if you use an older version of MySQL Workbench try the latest one (currently 6.2). For the SSH connection: you need an OpenSSH type key, not putty (ppk). You can use putty to convert to OpenSSH format, however.
I would like to complement Mike's answer, and include the step-by-step for those who don't know the use of Putty to perform the conversion that Mike refers to.
Open the PuTTYgen program > Conversions > Import Key > 'Select your key with the .ppk format' > Export OpenSSH> Select the directory and save the new format.
Use this file into mysql worckbench and it will work.
The problem is indeed that the "MYSQL Hostname" needs to be "localhost" or "127.0.0.1".
The MySQL hostname must be relative to the SSH server.
If your MySQL server is on the same machine as the SSH server,
try using 'localhost' instead of your SSH server's IP.
For me, the default package in ubuntu 18.04 using "apt install mysql-workbench" install the v6.3.8 that have a bug with ssl/tunnel connection (along with the 6.3.9)... I purged/unistalled it and installed the latest deb version from the website https://dev.mysql.com/downloads