![]() Use this only when you are doing simple testing and on a non production server. This is the quick and insecure way of creating a user at the office that can do any thing on the MySQL database from any of the networks. I need to grant statement that will let me use the mysql client on there machine at the office to connect to what ever database I give it access to. Have a look at the grant and create user statements.Īt our office, if I create a database on machine A and I want every body on the network 172.16.0.1/24 or 192.168.0.1/24 to be able to access that machine if they know the user name "office_user" and password "office_pass". Maybe you don't need to ssh into the machine at all, all you need to do is let MySQL know that clients from your network are allowed access to that machine. Oh, fwiw, if I use the first command, then the mysql command fails with the message ERROR 1130 (HY000): Host 'compt_A' is not allowed to connect to this MySQL server The reason it doesn't make sense to me is because the first command says, "establish an SSH tunnel over port 2200, forwarding local port 3307 to port 3306 on computer B" and that makes more sense than, "establish an SSH tunnel over port 2200, forwarding local port 3307 to port 3306 on 127.0.0.1" I was using the following command to make a tunnel ~$ssh -p 2200 -L 3307:compt_B:3306 cat. I figured out a solution, but I don't understand why. I just don't know how.Īnswering my own question (because I can't answer in less than 8 hours) Here is the interesting thing - I have another gui program called Sequel Pro (a desktop MySQL client for Mac OS X), and that is able to make a connection to over ssh just fine. ![]() However, the following fails (in another terminal A~ $ mysql -P 3307 -u punkish -pĮRROR 1045 (28000): Access denied for user (using password: YES) I am not sure if the tunnel is established, but I am assuming it is. This will allow me to use a gui program (Quantum GIS) that wants to connect to mysql, but can't do it over a tunnel. However, I want to set up port forwarding over ssh on my computer so all requests made for mysql on port 3307 on my computer A are actually sent to port 3306 on B. I can ssh into B over port 2200 with ssh key pairs set up, and once in, I can connect to the db like so A~ $ ssh -p 2200 $ mysql -u punkish -p database I have access to computer B that also has mysql running on it. I am on computer A, and have mysql running on it, and can connect to it as A~ $ mysql -u punkish -p database and so on. ![]() You will be asked if you want to trust the SSH server.All the computers involved are Mac OS X 10.6.x machines. MySQL Host 127.0.0.1 Username homestead Password secret Database homestead Port Leave empty (3306 as default) SSH Host 192.168.10.10 (Or whatever you set yours too in your Homestead.yaml file) SSH User vagrant SSH Password secret SSH Port Leave empty Connect using SSL checkbox Leave empty Now simply fill in the following details: Next up click the SSH button in the connection window. ![]() Ok, first step is to open SequelPro and create a new connection by clicking the small plus sign in the bottom left. If you start changing your defaults this may not work for you… Using the default passwords the step as are as below. ![]() I’ve also found with more complex setups that Laravel Valet doesn’t always work as intended. In my experience the best way to connect SequelPro on a Mac to a Homestead Vagrant MySQL database is via SSH.Īlthough you can run multiple apps per vagrant box I’ve always been happier running Homestead in the Per Project mode. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |