1. 先取出原来mysql的环境变量(会影响mysql服务的注册)
  2. 复制mysql目录(第二个数据库)
  3. 注册个mysql服务(我安装的是mysql5)
    cd xx/bin
    mysqld -install mysql5
    net start mysql5
  4. 查看mysql使用的端口:
    show global variables like 'port';
  5. 改密码
    set password for root@localhost = password('123');  

EFT:

https://blog.csdn.net/lizhikang2009/article/details/51123812

https://www.cnblogs.com/Bro-Young/p/5947163.html

https://www.cnblogs.com/yang82/p/7794712.html