glibc方式安装mysql
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,下载安装包 mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz创建mysql用户useradd -r mysql -s /sbin/nologin解压文件tar -z
千家信息网最后更新 2026年11月02日glibc方式安装mysql
下载安装包 mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz
创建mysql用户useradd -r mysql -s /sbin/nologin
解压文件tar -zxvf mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz -C /opt/
改名mv /opt/mysql-5.6.38-linux-glibc2.12-x86_64/ /opt/mysql-5.6
创建数据目录mkdir /data
更改目录属组
chown -R mysql.mysql /datachown -R mysql.mysql /opt/mysql-5.6/安装mysql
cd /opt/mysql-5.6/scripts/ ./mysql_install_db --basedir=/opt/mysql-5.6/ --datadir=/data --user=mysql --pid-file=/opt/mysql-5.6/mysql.pid安装mysql报错FATAL ERROR: please install the following Perl modules before executing
缺少autoconf 包yum-y install autoconferror while loading shared libraries: libaio.so.1:
缺少libaio-devel包yum -y install libaio-devel
添加启动脚本cp /opt/mysql-5.6/support-files/mysql.server /etc/init.d/mysqld
修改配置文件
vi /etc/my.cnf[mysqld] basedir = /opt/mysql-5.6 datadir = /data socket = /tmp/mysql.sock pid-file =/opt/mysql-5.6/mysql.pid log-bin=mysql-bin binlog_format=mixed character-set-server = utf8 max_connections = 3000 default_storage_engine = InnoDB innodb_file_per_table = 1 innodb_open_files = 500 innodb_buffer_pool_size = 64M innodb_write_io_threads = 4 innodb_read_io_threads = 4 innodb_thread_concurrency = 0 innodb_purge_threads = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 2M innodb_log_file_size = 32M innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 interactive_timeout = 28800 wait_timeout = 28800 lower_case_table_names=1 event_scheduler=1 skip-name-resolve=1[mysqldump] quick max_allowed_packet = 32M启动mysql
/etc/init.d/mysqld start修改root密码
cd /opt/mysql-5.6./bin/mysqladmin -u root password '123'登录mysql
cd /opt/mysql-5.6./bin/mysql -uroot -p'123'删除空用户和空密码
delete from mysql.user where user='';delete from mysql.db where user='';报错
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)找到mysql.sock文件,然后做个软连接ln -s /opt/mysql-5.6/mysql.sock /tmp/mysql.sock
文件
密码
用户
目录
数据
脚本
登录
配置
方式
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
花魁咖啡
互联网科技企业
广州淘业互联网络科技
广州大一互联网络科技有限公司
为想互联网科技怎么样
广州百单互联网科技有限公司
上海互联网科技有限公司
互联网科技的发展
北京互联网络科技有限公司
深圳艾佳互联网科技
国外互联网科技网站
太原新华互联网科技学校怎么样
博兴的互联网电子科技公司
恒银科技与互联网金融
常德市电业局互联网科技部
成都互联网科技公司工作好不好
上海创道互联网络科技有限公司
下一代互联网重大应用科技园
银川新华互联网科技学校招聘
互联网科技快速发展优美句子
互联网络科技
北京路客互联网科技有限公司
重庆互联网络科技
北京互联网科技公司
九亚互联网科技
无线互联网科技
佰商互联网科技有限公司
广州慧亚互联网科技怎么样
互联网科技创新的路径
互联网科技快速发展优美句子