您好,欢迎来到知库网。
搜索
您的当前位置:首页manjaro gome下安装配置MySQL

manjaro gome下安装配置MySQL

来源:知库网
sudo pacman -S mysql
sudo mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql

如果成功,terminal会出现:

2018-10-01T02:34:52.480465Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-10-01T02:34:52.480614Z 0 [System] [MY-013169] [Server] /usr/bin/mysqld (mysqld 8.0.12) initializing of server in progress as process 11041
2018-10-01T02:35:27.030779Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: HA(pmD=en5b*
2018-10-01T02:35:52.397730Z 0 [System] [MY-013170] [Server] /usr/bin/mysqld (mysqld 8.0.12) initializing of server has completed

HA(pmD=en5b*就是临时产生的一个root用户的密码,需要登录进去重新更改才可以操作数据库。

先启动mysql服务:

sudo systemctl start mysqld

然后登录:

mysql -u root -p

更改root临时密码:

ALTER user 'root'@'localhost' IDENTIFIED BY 'new_password';

然后就可以各种命令了。


image.png

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务