zabbix之MySQL数据库的安装

转载自:http://www.ttlsa.com/mysql/install-mysql5_6/

启动MySQL并制定套接字

mysql -u user -ppassword -S 指定socket路径

MySQL密码丢失

  1. service mysql stop
  2. mysqld_safe --skip-grant-tables
  3. mysql
  4. use mysql
  5. update user set password=password("12345") where user="root";
  6. flush privileges;
  7. 停止mysql进程:Ctrl+z,如果发现mysqld_safe,直接kill即可。
  8. service mysql start
  9. mysql -uroot -p12345
原文地址:https://www.cnblogs.com/wspblog/p/6094315.html