DDR爱好者之家 Design By 杰米
本实例要求下载并安装调试Mysql数据库。
第一步:下载Mysql数据库安装所需的全部软件。
我已提前下载好数据库软件,直接在服务器下载即可,如下:
通过scp直接下载:
[root@agt20 ~]# scp root@192.168.122.10:/root/mysql* /root/
软件如下图:
[root@agt20 ~]# ls mysql-* mysql-5.7.17.tar mysql-community-client-5.7.17-1.el7.x86_64.rpm mysql-community-common-5.7.17-1.el7.x86_64.rpm mysql-community-devel-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm mysql-community-libs-5.7.17-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm mysql-community-server-5.7.17-1.el7.x86_64.rpm mysql-community-test-5.7.17-1.el7.x86_64.rpm
第二步:通过yum进行安装,起服务器并查看
[root@agt20 ~]# yum -y install mysql-*.rpm [root@agt20 ~]# systemctl restart mysqld [root@agt20 ~]# systemctl enable mysqld [root@agt20 ~]# systemctl status mysqld.service \u25cf mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since \u4e8c 2019-10-15 11:29:11 CST; 1min 15s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Main PID: 31584 (mysqld) CGroup: /system.slice/mysqld.service \u2514\u250031584 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid... 10\u6708 15 11:28:42 agt20.tedu.cn systemd[1]: Starting MySQL Server... 10\u6708 15 11:29:11 agt20.tedu.cn systemd[1]: Started MySQL Server. [root@agt20 ~]#
第三步:连接MySQL服务器,修改密码;
1)查看初始密码
[root@agt20 ~]# grep -i 'password' /var/log/mysqld.log 2019-10-15T03:28:55.200931Z 1 [Note] A temporary password is generated for root@localhost: r3qhDysMrM)
2)使用初始密码连接mysql服务
[root@agt20 ~]# mysql -uroot -p'r3qhDysMrM)' mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17 Copyright (c) 2000, 2016, 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>
3)重置数据库管理员roo本机登录密码
mysql> alter user root@localhost identified by 'Pwd@123...'; Query OK, 0 rows affected (0.00 sec)
4)修改密码策略
mysql> set global validate_password_policy=0; Query OK, 0 rows affected (0.01 sec) mysql> set global validate_password_length=6; Query OK, 0 rows affected (0.00 sec) mysql> alter user root@localhost identified by 'pwd@123'; Query OK, 0 rows affected (0.00 sec)
5)使用修改后的密码登录
[root@agt20 ~]# mysql -uroot -ppwd@123 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.17 MySQL Community Server (GPL) Copyright (c) 2000, 2016, 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数据库安装调试完成!!!!
总结
以上所述是小编给大家介绍的CentOS7安装调试Mysql数据库的步骤详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
更新日志
2024年11月25日
2024年11月25日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]