mysql登录创建用户的方法:1、使用root帐户登陆mysql,代码为【mysql -uroot -p】;2、创建一个只能在mysql服务器所在主机使用的用户,代码为【create user '用户名'@'localhost' ..】。