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.
Related
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
I installed XAMPP v3.2.1 because I wanted to learn how to create database in MySQL and learn more about TOMCAT. However, I am a little confused about what to do now. I have read many blogs and the documentation on this page http://dev.mysql.com/doc/refman/5.0/en/creating-database.html.
While following the directions I found that:
I can't access my local host.
Attempted Solution: I shut down skype because I read that might be an issue.
I don't have any older versions of XAMPP on my computer and I don't believe I am connected to any other servers. So, I don't have permission to do anything.
OR
Am I trying to access mysql through the wrong command prompt? I am trying to use MySQL from the XAMPP shell. I am not sure why I cannot get everything working. Am I going about this the wrong way?
Thanks for any help
XAMPP only offers MySQL (Database Server) & Apache (Webserver) in one setup and you can manage them with the xampp starter.
After the successful installation navigate to your xampp folder and execute the xampp-control.exe
Press the start Button at the mysql row.
Now you've successfully started mysql. Now there are 2 different ways to administrate your mysql server and its databases.
But at first you have to set/change the MySQL Root password. Start the Apache server and type localhost or 127.0.0.1 in your browser's address bar. If you haven't deleted anything from the htdocs folder the xampp status page appears. Navigate to security settings and change your mysql root password.
Now, you can browse to your phpmyadmin under http://localhost/phpmyadmin or download a windows mysql client for example navicat lite or mysql workbench. Install it and log in to your mysql server with your new root password.
XAMPP Apache + MariaDB + PHP + Perl (X -any OS)
After successful installation execute xampp-control.exe in XAMPP folder
Start Apache and MySQL
Open browser and in url type localhost or 127.0.0.1
then you are welcomed with dashboard
By default your port is listing with 80.If you want you can change it to your desired port number in httpd.conf file.(If port 80 is already using with other app then you have to change it).
For example you changed port number 80 to 8090 then you can run as 'localhost:8090' or '127.0.0.1:8090'
Changing XAMPP Default Port:
If you want to get XAMPP up and running, you should consider changing the port from the default 80 to say 7777.
In the XAMPP Control Panel, click on the Apache – Config button which is located next to the ‘Logs’ button.
Select ‘Apache (httpd.conf)’ from the drop down. (Notepad should open)
Do Ctrl+F to find ’80’ and change line Listen 80 to Listen 7777
Find again and change line ServerName localhost:80 to
ServerName localhost:7777
Save and re-start Apache. It should be running by now.
The only demerit to this technique is, you have to explicitly include the port number in the localhost url. Rather than http://localhost it becomes http://localhost:7777.
<?php
if(!#mysql_connect('127.0.0.1', 'root', '*your default password*'))
{
echo "mysql not connected ".mysql_error();
exit;
}
echo 'great work';
?>
if no error then you will get greatwork as output.
Try it saved my life XD XD
I created an app called "world" following the instructions from:
https://blog.openshift.com/12-tips-for-hosting-wordpress-on-openshift/.
It's a hosted Wordpress blog, with PHP 5.4 scalable up to 1GB, with a Web Load Balancer and MySQL 5.5.
Everytime I try to check for the space used, I get the same error.
rhc show-app world --gears quota
Unable to connect to gear 54d48383fcf933f91f0000aa#54d48383fcf933f91f0000aa-laurapons.rhcloud.com
Unable to connect to gear 54d48383fcf933f91f0000a9#world-laurapons.rhcloud.com
Gear Cartridges Used Limit
------------------------ ------------------- ----- -----
54d48383fcf933f91f0000aa mysql-5.5 error 1 GB
54d48383fcf933f91f0000a9 haproxy-1.4 php-5.4 error 1 GB
I tried to restart the application (using restart and stop&start commands) but nothing seems to work.
I am also facing some other connection problems (probably related to the same issue):
I have the same problem when trying to clone the application with git clone:
ssh: connect to host world-laurapons.rhcloud.com port 22: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
And also with the rhc port-forward world
I copied the URL for git clone from the openshift online dashboard, and I can open the wordpress blog and see all the information, but somehow, I'm unable to access to the data.
I have already created a default Public Key and 2 authorisations (one to access through the browser and the other to access through RHC)...
What should I try?
How can I get the usage?
Do I need to set up anything else?
I am stuck... any suggestion?
Sounds like your SSH key is not working properly. Make sure you installed your keys and that they are working. Try running 'rhc setup'. If that still doesn't work try
ssh -vvv 54d48383fcf933f91f0000a9#world-laurapons.rhcloud.com
and look at the output.
You can also try using
ssh -i /path/to/your/ssh.key 54d48383fcf933f91f0000a9#world-laurapons.rhcloud.com
And see if that works (specifies what ssh key to use)
rhc with some ruby version will have issue with pageant (putty). I closed pageant, ran again rhc command then it worked.
I have two model
1) Server Model : conneted to remote database which is stored on server
2) Local Host : connected to my pc database is stored in on pc.
I want to query to both database tables simultaneously.
Each time i have to switch between database model.
How to do it?
That's a traditional limitation of MySQL Workbench. You cannot open 2 models at the same time in a single instance of MySQL Workbench. On some platforms (like Windows) you can however open multiple instances (just be careful when changing settings, connections etc. as they are shared among all instances, last save wins).
On Windows you may have to enable multiple instances first by changing the setting under Edit > Preferences > Others (tab):
To launch multiple instances of WorkBench thru the Mac Terminal
Mac Version: OS X El Capitan Version 10.11.6
Workbench Version: Version 6.2.5.0. Build 397 (32bit) ###
On Your Mac;
Open MySQLWorkbench
Open Terminal
run ps ax | grep -i workbench (as stated above by Derek)
Remember the location part of the output:
ie: /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
Lastly, run this to open new Instances on your mac
open -Fna /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
Please modify the path to your mysql from step 3.
Further Explanation: (from the man pages for open)
-F Opens the application "fresh," that is, without restoring windows. Saved persistent state is lost, except for Untitled documents.
-n Open a new instance of the application(s) even if one is already running.
-a application
Specifies the application to use for opening the file
As Mike Lischke said.
You can allow multiply instances of MySQL Workbench
Edit -> Preferences -> General (tab) -> Others (section) -> check box
You can launch multiple instances of WorkBench using the Terminal Application. Open Workbench as normal, then open Terminal.app. Run "ps ax | grep -i workbench", you should see a result like this: "11260 ?? U 2:34.86 /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench -psn_0_1823165". Copy this part, and paste it into Terminal, /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench and hit enter. That will create another instance. Open a new terminal tab, and do that as many times as you wish.
On linux I can open two msql workbench instances. The second instance can be opened by running the executable file directly.
Find where the executable file is located by running
ps -ef | grep workbench
20084 1989 0 May09 ? 00:00:00 /bin/bash /usr/bin/mysql-workbench
20123 20084 0 May09 ? 00:00:00 /bin/sh /usr/bin/catchsegv /usr/bin/mysql-workbench-bin
20125 20123 0 May09 ? 00:13:25 /usr/bin/mysql-workbench-bin
26810 1499 0 11:00 pts/18 00:00:00 grep --color=auto workbench
Then run the executable file as a root user
sudo /usr/bin/mysql-workbench
I was trying to reinstall MySQLServer on my local machine (Win7 32), using Windows (x86, 32-bit), MSI Installer.
When wizard configure server, after installation, gives the error "Configuration failed", with details:
mysql-server-5.5-win32:6 - Looking for valid template
mysql-server-5.5-win32:13 - Found valid template.
mysql-server-5.5-win32:20 - Attempting to process template.
mysql-server-5.5-win32:26 - Processed template.
mysql-server-5.5-win32:33 - Attempting to configure service.
mysql-server-5.5-win32:40 - Configured service.
mysql-server-5.5-win32:46 - Attempting to start service.
mysql-server-5.5-win32:100 - Unable to configure service.
mysql-server-5.5-win32:100 - Product configuration controller finished configuration.
Why does it happen?
Can it result from using a wrong "old" password that I put in the installation wizard, to set a new password? If yes - How can I clean up ALL previous settings of MySQL server?
Uninstall MySql and all his components excepted Oracle installer, re launch installer, do normally, when your error comes, finish the procedure of installation.
Next step, in start menu search "services", execute services administration tool, right click on the service "MySql Server XX", select "Connexion" tab and check "system account" on start user, launch the process and it would work.
I was struggling with upper problem over 3 days and I think there is a bug when you want to install this with local connection (not tick TCP connection) via .msi installer. After i selected this the configuration passed properly with no fail configuration. My sollution was to run this with set tick on TCP connection and then in server folder in my.ini file just uncomment line # skip-networking .
Other tips:
Turn off the firewall or add rule for installer to accept public/private net connections.
Under admin privileages use netstat -ab | more command to check ports usage
If u fail with earlier installations run services.msc command find your service (installer set is as defauls something like MySQL56,MySQL56_1 - depending on version) get the name of this service and under admin privileage run cmd and type sc stop "coppiedServiceName" if the service is running and later sc delete "coppiedServiceName"
In some forum says that if might be usefull to turn of windows defender or antivirus too
If you change default installation directory after reinstall check for old install files on C:\Program Files C:\ProgramData and get rid of them
Hope somebody find this usefull.
I had the same issue on Windows XP. The problem was caused by the localization. I had to change the path to the All User's AppData folder using regedit. The original path contained a non ANSI character.
The registry key is this:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
The value name is this:"Common AppData"
The original value was: "%ALLUSERSPROFILE%\Data aplikací"
I changed it to: "%ALLUSERSPROFILE%\AppData"
Then the installer succeeded.
NOTE: Uninstall MySQL first, then change the path, then install MySQL again.