时间:2021-07-01 10:21:17 帮助过:6人阅读
5.创建链接
ln -s mysql-5.6.46-linux-glibc2.12-x86_64/ mysql
6.授权
chown -R mysql:mysql /data chown -R mysql:mysql /usr/local/mysql-5.6.46-linux-glibc2.12-x86_64
7.编辑/etc/my.cnf文件
[client] port = 3306 [mysql] auto-rehash prompt="\\u@\\h [\\d]>" #pager="less ‐i ‐n ‐S" #tee=/opt/mysql/query.log [mysqld] user = mysql # mysql basedir =/usr/local/mysql/ # /usr/local/mysql/ datadir =/data/mysql/mysql3306/data # /usr/local/mysql/data server_id =1003306 # port =3306 # 3306 pid-file = /data/mysql/mysql3306/data/mysql.pid character-set-server=utf8 default-storage-engine=INNODB autocommit = 1 metadata_locks_hash_instances=64
8.初始化mysql
scripts/mysql_install_db --user=mysql
初始化过程中提示如何设置密码
./bin/mysqladmin -u root password ‘new-password‘ ./bin/mysqladmin -u root -h oracle password ‘new-password‘
9.启动mysql
bin/mysqld_safe --user=mysql &
官网安装
shell> groupadd mysql shell> useradd -r -g mysql -s /bin/false 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> scripts/mysql_install_db --user=mysql shell> bin/mysqld_safe --user=mysql & # Next command is optional shell> cp support-files/mysql.server /etc/init.d/mysql.server
mysql 5.6安装
标签:软件 default _id 过程 amp page server -- auto