当前位置: 代码迷 >> 综合 >> linux下安装mysql非安装版mysql-5.1.73-linux-i686-glibc23.tar.gz
  详细解决方案

linux下安装mysql非安装版mysql-5.1.73-linux-i686-glibc23.tar.gz

热度:16   发布时间:2024-01-16 18:46:49.0

1 官方安装文档

http://dev.mysql.com/doc/refman/5.1/en/binary-installation.html

2 安装

shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cp support-files/mysql.server /etc/init.d/mysql.server
shell> ./bin/mysqladmin -u root password 'new-password'
shell> ./bin/mysql_secure_installation
shell> ./bin/mysqld_safe --user=mysql &

3 部分命令解释

useradd -r -g mysql mysql:添加mysql用户的解释

Because the user is required only for ownership purposes, not      login purposes, theuseradd command uses the      -r option to create a user that does not have      login permissions to your server host

  相关解决方案