mysql rpm安装报错_Mysql rpm包安装
1.下載 MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm? MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm? MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm這三個軟件包,注意版本要一致:
2.安裝三個RPM包,遇到沖突和依賴可以先刪除相應的軟件。
rpm -ivh MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm
rpm -ivh MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm
rpm -ivh MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm
3.啟動mysql
/etc/init.d/mysql start
/etc/rc.d/init.d/mysql #啟動文件
/usr/share/my #包含my-default.cnf文件
/usr/my.cnf #主配置文件
/usr/lib64/mysql#mysql#庫文件夾
/var/lib/mysql#數據庫文件存放目錄
4.登入mysql報錯
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
5.先停用數據庫服務
service mysqld stop
查看進程端口是否停用
ss -tnlp|grep mysql
進入MYSQL安全模式,通常會卡住,其實是在后臺運行,所以一分鐘后按Ctrl+C
/usr/bin/mysqld_safe --skip-grant-table &
然后以無密碼登錄
mysql -u root
6.修改密碼
使用mysql數據庫
use mysql
重設root密碼
update user set password=PASSWORD("huaxia") where user='root';
刷新庫
flush privileges;
退出
quit;
7.重新登入數據庫
[root@sever9 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.? Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.25-log MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
總結
以上是生活随笔為你收集整理的mysql rpm安装报错_Mysql rpm包安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CentOS系统双网卡路由设置
- 下一篇: CentOS下双网卡单网关路由配置