MySQL的源码安装流程
程序员文章站
2022-07-07 20:09:28
软件包提取码:dfmpmysql安装过程[root@CentOS1 ~]# yum -y install bison cmake ncurses-devel openssl-devel[root@CentOS1 ~]# tar zxf mysql-5.6.36.tar.gz [root@CentOS1 ~]# cd mysql-5.6.36/[root@CentOS1 mysql-5.6.36]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSY...
软件包提取码:dfmp
mysql安装过程
[root@CentOS1 ~]# yum -y install bison cmake ncurses-devel openssl-devel
[root@CentOS1 ~]# tar zxf mysql-5.6.36.tar.gz
[root@CentOS1 ~]# cd mysql-5.6.36/
[root@CentOS1 mysql-5.6.36]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHASETS=all
[root@CentOS1 mysql-5.6.36]# make && make install
[root@localhost mysql-5.6.46]# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib
[root@localhost mysql-5.6.46]# ln -s /usr/local/mysql/bin/* /usr/local/bin/
[root@localhost mysql-5.6.46]# useradd -M -s /sbin/nologin mysql
[root@localhost mysql-5.6.46]# chown -R mysql:mysql /usr/local/mysql/
[root@localhost mysql-5.6.46]# pwd
/root/mysql-5.6.46
[root@localhost mysql-5.6.46]# cd support-files/
[root@localhost support-files]# cp my-default.cnf /etc/my.cnf
cp: overwrite ‘/etc/my.cnf’? y
[root@localhost support-files]# cp mysql.server /etc/init.d/mysqld
[root@localhost support-files]# vim /etc/init.d/mysqld
46 basedir=/usr/local/mysql #mysql安装路径
47 datadir=/usr/local/mysql/data #数据存放目录
[root@localhost support-files]# chmod +x /etc/init.d/mysqld
[root@localhost support-files]# /usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
[root@localhost support-files]# /etc/init.d/mysqld start
Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
. SUCCESS!
[root@localhost support-files]# netstat -anput | grep LISTEN | grep 3306
tcp6 0 0 :::3306 :::* LISTEN 24121/mysqld
[root@localhost support-files]# mysqladmin -uroot password 123.com
Warning: Using a password on the command line interface can be insecure.
[root@localhost support-files]# mysql -uroot -p123.com
本文地址:https://blog.csdn.net/m0_47338241/article/details/107164874
上一篇: 幸运是修炼来的
下一篇: python常用函数以及函数语法
推荐阅读
-
linux下mysql的安装步骤
-
Windows(x86,64bit)升级MySQL 5.7.17免安装版的详细教程
-
Linux 安装JDK Tomcat MySQL的教程(使用Mac远程访问)
-
mysql5.7.18安装时mysql服务启动失败的解决方法
-
MySQL5.7.20解压版安装和修改root密码的教程
-
CentOS7.x卸载与安装MySQL5.7的操作过程及编码格式的修改方法
-
Windows10 64位安装MySQL5.6.35的图文教程
-
Ubuntu18.04 安装mysql8.0.11的图文教程
-
MySql 安装时的1045错误
-
解析windows下使用命令的方式安装mysql5.7的方法