Configuration file
Vim /etc/my.cnf
If the login address is not required, directly remove the necessary parameter -h when logging in to the database
change Password
Known password
Use mysql;
update user set password=passworD("要改的密码") where user='root';
FLUSH PRIVILEGES;
forget password
Service mysqld stop
Vim /etc/my.cnf
Service mysqld start
Msql -uroot -p 直接回车进入
参照记住密码项修改面
最后重启mysql
Service mysqld restart
Enable the remote function so that the link tool can link
After logging in to mysql,
use mysql;
update user set host ='%' where user ='root';
flush privileges;
to
view the effect
Use mysql;
Select host, user from user where user='root';
sql export and import:
Export command:mysqldump -h127.0.0.1 -P3306 -uroot -proot education >d:/database.sql
Import command:mysql -uroot -proot -h127.0.0.1 -P3306 education<d:/database.sql