Installing MySQL in virtual machine

Time:2020-11-20

catalog
  • Download MySQL
  • install
  • Configure Mysql to allow remote access

Download MySQL

Download address: http://dev.mysql.com/downloads/mysql
I download the installation version here

install















Configure Mysql to allow remote access

  • Enter MySQL:
    /usr/local/mysql/bin/mysql -u root -p
  • Use MySQL Library:
    use mysql;
  • To view the user table:
    SELECT Host,User FROM user;
  • Update user table:
    UPDATE user SET Host = '%' WHERE User = 'root' LIMIT 1;
    %If you need to specify a specific IP address, you can write a specific IP address
    Because the user table above has changed the name of the root user with the address of localhost% to%, you can no longer use the localhost address to log in locally, but you can use the address of 127.0.0.1.
  • Force refresh permission:
    flush privileges;

Recommended Today

Interviewer: young man, what do you think of the principle of distributed system

1 Concept 1.1 model 1.2 copies 1.3 indicators for measuring distributed systems 2. Principle of distributed system 2.1 data distribution 2.2 basic copy agreement 2.3 lease mechanism 2.4 quorum mechanism 2.5 log technology 2.6 two phase submission protocol 2.7 MVCC 2.8 Paxos protocol 2.9 CAP 1 Concept 1.1 model node In a specific project, a […]