mysql5.7升级到mariadb-server-10.0

复制代码
5.7############################..............................................................................................]
The file /var/lib/mysql/debian-5.7.flag indicated a
version that cannot automatically be upgraded. Therefore the
previous data directory will be renamed to /var/lib/mysql-5.7 and
a new data directory will be initialized at /var/lib/mysql.
Please manually export/import your data (e.g. with mysqldump) if needed.
invoke-rc.d: could not determine current runlevel
Unpacking mariadb-server-10.0 (10.0.38-0ubuntu0.16.04.1) ...
Selecting previously unselected package mariadb-server.##############################.......................................................................................................]
Preparing to unpack .../mariadb-server_10.0.38-0ubuntu0.16.04.1_all.deb ...
Unpacking mariadb-server (10.0.38-0ubuntu0.16.04.1) ...#################################....................................................................................................]
Processing triggers for man-db (2.7.5-1) ...#################################################...............................................................................................]
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libdbd-mysql-perl (4.033-1ubuntu0.1) ...################################################.........................................................................................]
Setting up mariadb-client-core-10.0 (10.0.38-0ubuntu0.16.04.1) ...#######################################...................................................................................]
Setting up mariadb-client-10.0 (10.0.38-0ubuntu0.16.04.1) ...##################################################.............................................................................]
Setting up mariadb-server-core-10.0 (10.0.38-0ubuntu0.16.04.1) ...##################################################........................................................................]
Setting up mariadb-server-10.0 (10.0.38-0ubuntu0.16.04.1) ...#############################################################..................................................................]
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
invoke-rc.d: could not determine current runlevel############################################################################...............................................................]
 * Stopping MariaDB database server mysqld                                                                                                                       [ OK ]
Setting up mariadb-server (10.0.38-0ubuntu0.16.04.1) ...########################################################################............................................................]
Processing triggers for systemd (229-4ubuntu21.2) ...#################################################################################......................................................]
Processing triggers for ureadahead (0.100.0-19) ...of script `mysql' overrides LSB defaults (0 1 6).
root@PC-RENGUOQIANG:/etc/init.d# 

mysqladmin -uroot -p  root

mysql -uroot -proot

SET password for 'root'@'localhost'=password('root');




MariaDB [mysql]> select user, plugin from mysql.user;
+------+-------------+
| user | plugin      |
+------+-------------+
| root | unix_socket |
+------+-------------+
1 row in set (0.00 sec)

update mysql.user set authentication_string=PASSWORD('root'), plugin='mysql_native_password' where user='root';

flush privileges;
复制代码

 

Mariadb修改root密码 - KeithTt - 博客园
https://www.cnblogs.com/keithtt/p/6922378.html

 

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

解决方案:

mysql - ERROR 1698 (28000): Access denied for user 'root'@'localhost' - Stack Overflow
https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

MySQL ERROR 1698 (28000) 错误 - leolztang - 博客园
https://www.cnblogs.com/leolztang/p/5094930.html

 

posted @   任国强  阅读(1081)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2019-01-31 Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval o
2019-01-31 JEECG 不同(角色的)人对同样的字段数据,使用不同的字段验证规则
2019-01-31 CRM系统设计方案
2018-01-31 Daemon Thread [shirocache] (Running)
2010-01-31 嘻哈 软件技术知识与项目管理知识
点击右上角即可分享
微信分享提示