本文共 946 字,大约阅读时间需要 3 分钟。
mysqladmin -uroot password "123"
mysqladmin -uroot -p123 password "pwd@123"
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '1234';
(1)将user表当前路径下numer为1更新密码为321
update user set user_passwd=password('321') where number='1';(2)不在user表当前路径指定路径将numer为1更新密码为321update hehe.user set user_passwd=password('321') where number='1';注:更新记录建议指定主键为更新条件mysql> set character_set_client = utf8;
mysql> alter table 表名 engine=引擎;
vim /etc/my.cnf
(1)更改指定库下所有表(或指定库下指定表)的存储引擎;适用与YUM
mysql_convert_table_format --user=用户 --password='密码' --socket=/var/lib/mysql/mysql.sock --type=引擎 库名 [表名](2)更改指定库下所有表(或指定库下指定表)的存储引擎;适用于源码
mysql_convert_table_format --user=用户 --password='密码' --socket=/usr/local/mysql/data/mysql.sock --type=引擎 库名 [表名]转载于:https://blog.51cto.com/13043516/2117973