Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. # sudo yum install mysql-server
  2.  
  3. Dependencies Resolved
  4.  
  5. ===========================================================================================================================================================================================================
  6. Package Arch Version Repository Size
  7. ===========================================================================================================================================================================================================
  8. Removing:
  9. mysql-community-client x86_64 5.7.10-1.el7 @mysql57-community 109 M
  10. mysql-community-server x86_64 5.7.10-1.el7 @mysql57-community 652 M
  11.  
  12. Transaction Summary
  13. ===========================================================================================================================================================================================================
  14.  
  15. # sudo service mysqld start
  16.  
  17. # ps -ef|grep mysql
  18. mysql 1371 1 0 22:17 ? 00:00:00 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
  19.  
  20. # sudo mysql_secure_installation
  21. // when password is required, I just type "enter key"
  22.  
  23. service mysqld stop
  24. mysqld_safe --skip-grant-tables &
  25. mysql --user=root mysql
  26. update user set Password=PASSWORD('new-password') where user='root';
  27. flush privileges;
  28. exit;
  29.  
  30. $ sudo systemctl start mysqld
  31.  
  32. $sudo grep 'temporary password' /var/log/mysqld.log
  33.  
  34. 10.744785Z 1 [Note] A temporary password is generated for root@localhost: o!5y,oJGALQa
  35.  
  36. $ sudo mysql_secure_installation
  37. Securing the MySQL server deployment.
  38.  
  39. Enter password for user root:
  40.  
  41. $ mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement