GithubHelp home page GithubHelp logo

Access MySQL from box IP about homestead HOT 3 CLOSED

laravel avatar laravel commented on May 5, 2024
Access MySQL from box IP

from homestead.

Comments (3)

brunowego avatar brunowego commented on May 5, 2024

Hope this help anybody.

from homestead.

lukearmstrong avatar lukearmstrong commented on May 5, 2024

I also get this error using Sequel Pro and MySQL Workbench, seems it isn't possible to "tunnel in".

But when I connect normally, using port 33060, neither the root or homestead users have the "GRANT" privilege, so I can't create other users using those accounts.

Frustrating.

from homestead.

lukearmstrong avatar lukearmstrong commented on May 5, 2024

SSH into the VM

ssh [email protected] -p 2222

Login to MySQL, the password is secret

mysql -u root -p

Setup the root user to have GRANT privileges from anywhere.

GRANT GRANT OPTION ON *.* TO root@'%' IDENTIFIED BY 'secret';
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'secret';
GRANT SUPER ON *.* TO root@'%' IDENTIFIED BY 'secret';

Remove the alternative root users.

DROP USER 'root'@'10.0.2.2';
DROP USER 'root'@'homestead';
DROP USER 'root'@'localhost';
DROP USER 'root'@'127.0.0.1';
DROP USER 'root'@'::1';

Setup the homestead user to have GRANT privileges from anywhere.

GRANT GRANT OPTION ON *.* TO homestead@'%' IDENTIFIED BY 'secret';
GRANT ALL ON *.* TO homestead@'%' IDENTIFIED BY 'secret';
GRANT SUPER ON *.* TO homestead@'%' IDENTIFIED BY 'secret';

Remove the alternative homestead users.

DROP USER 'homestead'@'10.0.2.2';

Now flush the privileges.

FLUSH PRIVILEGES;

from homestead.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.