3. Set the mysql service to boot up (after turning off the virtual machine, you may forget to turn on the service the next time you restart it, so after setting the mysql service, it will not take too much boot time)
chkconfig mysqld on
4. Enter the mysql command line and type the following command
mysql
5. mysql command line commands (you need to modify mysql login permissions after installing mysql)
--切换数据库use mysql
--查看表showtables--查看表的数据select host,user,password fromuser;--插入权限数据grantallprivilegeson*.*to'root'@'%' identified by '123' with grant option
--删除本机的用户访问权限(可以执行也可以不执行)
delete from user where host!='%'
--刷新权限或者重启mysqld的服务
service mysqld restart;--(重启mysql服务)
flush privileges;--(刷新权限)