nitrous.io and mysql workbench - mysql

I've installed MySQL using the instructions on nitrous.io using autoparts. Once installed and running, is it possible to use your local MySQL workbench to connect to the MySQL Server installed on that nitrous.io environment?
So you could ssh into your nitrous.io box from your local machine, but can you do the same and connect to MySQL using your local machine? If so, what credentials would you use?

You can use MySQL Workbench and other apps if you establish SSH tunneling with your Nitrous box. Run the following command in your Unix console, replacing the variables with the actual values found on your boxes page:
ssh -N -p <box_port> action#<box_host> -L <local_port>/localhost/<remote_port>
From there you can open up MySQL Workbench and connect to host 127.0.0.1 on port 3306. You will also need to ensure your MySQL database on Nitrous is running. Run parts start mysql to start up the database.
Take a look at the Nitrous.IO guide for a complete walkthrough.

Related

Error Connecting to Remote MySQL server hosted on Ubuntu from Windows

When attempting to connect to remote MySQL server from my Windows machine using MySQL workbench - I get an error about connecting to localhost (unsure where the software is picking up localhost). However when I attempt to connect through an SSH tunnel it connects just fine (I cannot use this for the software I am creating though)
when I run netstat on the server:
netstat command
...(more entries)
the bind address has been altered in mariadb and mysql configs. if there are any more configs people would like to see to help with solution please let me know. I have also set up the user in mysql to allow remote privileges:
mysql users
I am pretty confused.

Can't connect to mysql server (LAMP) in google cloud

I installed LAMP on a VM instance on Google cloud but when i try to access mysql database remotely from my linux terminal using
$ mysql -u username -h ipaddress -p
after entering password nothing happens (no error). I tried accessing it locally via ssh it works.
Is there any other setting on cloud platform. I need to change before accessing database from a remote pc. Followed this tutorial but it just stops after entering password.
Tried commenting out bind address but didn't work. Need help.
Just to be clear, are you using the mysql command on your remote machine or through SSH?
Normally, you should never allow external access to remote MySQL for security reasons, especially if the only app accessing the data is local. (however, it's unclear if that is the reason why you can't connect)
This is how you should connect:
Connect to your remote VM using SSH (ex: ssh user#ipaddress)
THEN, connect to your MySQL instance.
When connecting using a DB editor, some editors allow MySQL connections through SSH. Sequel Pro for Mac does this very well.

How can access a database in MySQL server on my laptop from a cloud instance (preferably from within R)?

I would like couple things clarified.
(I have mysql client installed on my remote VM running on Ubuntu 16.04, goal is to access the database from within R but I have been trying so far with mysql as such: mysql -u root -p -h fe80::883f:XXXX:XXX:XXXXX -P 3306 where for "XXX" I tried every ip address I get in windows command line when the command ipconfig is issued.
To narrow down my troubleshooting I want couple pointers:
Do I need to give the IP address for my remote(cloud) instance in the mysql config file (thus find my.cnf or its equivalent in windows in dir where mysql server is installed and bind the address for the remote/cloud VM I am trying to access the db on my laptop from).
2 SSL, is this something that needs to be enabled?
Additionally, from Bash on Ubuntu on Windows (WSL) I am able to log into mysql server with `mysql -u root -p'xxx' -h ' i.e. the ip address from windows command line ipconfig output called "Link-local IPv6 Address". After going over several posts and using my imagination(which gets me in trouble with troubleshooting), I feel like in some config file in MySQL server dir is have to "bind the address" for the remote VM (which I access via putty from my laptop), am thinking along the right path?
As for the privileges for the root user in mysql server I believe I have given root every privilege (show below):
enter image description here
If you're going to use the RJDBC package, you have to stick with JDBC. ODBC might be "one letter off", but it's not the same thing.
You need a few things to be in place:
The database on your Windows machine has to be running, visible from the Linux machine, and have a JDBC driver JAR available that will let you connect to it. If you tell me your database is Microsoft Access, you're done. There are no free JDBC drivers for Access.
You have to have the JDBC driver JAR for your database on the Linux machine, in the CLASSPATH that R will use to find it.
You need a JDK installed on the Linux machine. I recommend that you install nothing older than version 8.
Once this is in place it should be easy. I've done it.
I solved my issue and can access MySQL sever on my laptop from remote ression(that I access with putty as follows:
in putty first used 3307 as source, checked the remote radio buttons, set destination to localhost:3306 and at Bash prompt in VM:
mysql -u root -p -h '127.0.0.1' -P 3307
Or from Linux (I use WSL) Bash prompt:
# access the remote VM from Windows Linux subsystem(WSL)
ssh -R 3307:localhost:3306 blsingh#149.165.169.21
## access MySQL server on my laptop from Bash prompt on in WSL
mysql -u root -p -h'127.0.0.1' -P 3307
From here its not difficult to figure out how to access it in R; we have a remote port forward and we use the same parameters in R.
☼

Mac OS Yosemite : How to start mysql and connect Sequel Pro?

I have just installed MySQL using the installation documentation.
MySQL is installed in the directory /usr/local as indicated in the documentation.
I attempted to start MySQL using the following command on the command line:
/Library/StartupItems/MySQLCOM/MySQLCOM start
Is it normal that I did not receive a message in the terminal that MySQL has started.
Where is the configuration file location (where do I find the root user account)?
After running the MySQL start command, I launched Sequel Pro, but I cannot connect to 127.0.0.1. How can I connect to this? Here is a screenshot of what happens when I attempt to connect:
I would just like to to start mysql and connect a gui client, what am I missing?
you need to be root to start the service.
type sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
MySQL is configured to listen to port 3307 when installed on Yosemite. After you verify that effectively you started the service, change the Port parameter on your Sequel Pro access window and try again.

how do i connect to mysql database in Linux server through windows machine

I have a MYSQL in windows that needs to connect with MYSQL in Linux server.but I want to know is there any way to connect MYSQL in Linux server without having MYSQL in windows.
Follow the following instructions:
1. Open Terminal and type in : sudo apt-get install putty
2. Click Y on subsequent messages that appear and let the installation complete.
To use Putty, go to Menu > Internet > Putty SSH client
To connect to a remote server that supports ssh login , enter the host name or the IP address of the remote host, in case you need to frequently need to login to this server , save the session by naming it something nice.
If the connection is initiated for the first time or if the server hardware configuration has changed, you may see the message. This is to ensure that you are logging in only to the trusted server that you know and not something else.Accept that.
Finally, enter user name and password to login to the server remotely, if all goes well you will see the terminal on the remote end.
connect to mysql :
type mysql -u username -p password
You can use putty software. Here is the link to download.
You can use putty for connecting mysql.
Connection string will like this
mysql -uDBUSER -pDBPASSWORD DBNAME -hHOST-IP
Or you can also use navicat or sql yog software to connect mysql on linux system on remote.