|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1、rpm -qa | grep mariadb 2、rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64 3、tar -zxvf mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz 4、mv mysql-5.7.9-linux-glibc2.5-x86_64 mysql 5、cd mysql 6、groupadd mysql 7、useradd -r -g mysql mysql 8、chown -R mysql:mysql /usr/local/mysql 9、mkdir data 10、cd data 11、mkdir mysql 12、cd mysql 13、mkdir data 14、vi /etc/my.cnf 15、mkdir -p /var/lib/mysql/data/ 16、mkdir -p /var/log/mysql/ 17、touch /var/log/mysql/mysql.log 18、chown -R mysql:mysql /usr/local/mysql 19、chown -R mysql:mysql /var/log/mysql/ 20、chown -R mysql:mysql /var/log/mysql/ 21、chown -R mysql:mysql /usr/local/mysql 22、/usr/local/mysql/bin/mysqld --user=mysql --initialize --explicit_defaults_for_timestamp 23、/usr/local/mysql/bin/mysql_ssl_rsa_setup --datadir=/usr/local/mysql/data/mysql/data 24、service mysql start 25、find / -name mysql.server 26、cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql 27、service mysql start 28、ln -s /usr/local/mysql/bin/mysql /usr/bin 29、grep 'temporary password' /var/log/mysql/mysql.log 30、mysql -uroot -p 31、alter user 'root'@'localhost' identified by 'root'; 32、flush privileges; 33、create user root@'%' identified by 'root'; 34、flush privileges; 35、useradd moupuser 36、passwd moupuser 37、vi /etc/sudoers 38、firewall-cmd --query-port=3306/tcp 39、firewall-cmd --add-port=3306/tcp --permanent 40、firewall-cmd --reload |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [client] default-character-set=utf8 socket=/usr/local/mysql/mysql.sock [mysql] default-character-set=utf8 socket=/usr/local/mysql/mysql.sock [mysqld] port=3306 user=mysql basedir=/usr/local/mysql datadir=/var/lib/mysql/data socket=/usr/local/mysql/mysql.sock pid-file=/usr/local/mysql/data/mysql.pid character-set-server=utf8 lower_case_table_names=0 max_connections=800 max_connect_errors=1000 default-storage-engine=INNODB transaction-isolation = REPEATABLE-READ sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION read_buffer_size=512KB read_rnd_buffer_size=32M back_log=1024 log_output=FILE general_log =0 log-error=/var/log/mysql/mysql.log innodb_buffer_pool_size=500M secure_file_priv= | |
002-mysql安装
小小药2024-12-07 10:28
相关推荐
Tttian62218 分钟前
基于Pycharm与数据库的新闻管理系统(2)Redis做梦敲代码1 小时前
达梦数据库-读写分离集群部署苹果醋32 小时前
2020重新出发,MySql基础,MySql表数据操作小蜗牛慢慢爬行2 小时前
如何在 Spring Boot 微服务中设置和管理多个数据库hanbarger2 小时前
nosql,Redis,minio,elasticsearch微服务 spring cloud2 小时前
配置PostgreSQL用于集成测试的步骤先睡2 小时前
MySQL的架构设计和设计模式弗罗里达老大爷2 小时前
Redis仰望大佬0073 小时前
Avalonia实例实战五:Carousel自动轮播图