MySQL数据库学习-1

修改用户密码: 

-- 以前的方式
update user set password=password('新密码') where user='用户名';
update mysql.user set authentication_string=password('新密码') where user='用户名';
-- mysql8.0 
ALTER USER '用户名'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';

 

 # 其他函数

-- 普通ip转数字IP
select inet_aton("127.0.0.1") as ip;
select inet_ntoa(2130706433) as ips;

-- 进制转换函数
select conv(10011,10,16) as num; 

 

posted @ 2023-06-03 18:04  人人从众  阅读(18)  评论(0)    收藏  举报