如何在LINUX系统下安装MySQL压力测试工具super smack

2023-04-14 15:47:00 安装 压力 测试工具

如何在LINUX系统下安装MySQL压力测试工具super smack

1.下载安装包

下载地址:http://www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26.tar.gz/from/http://cdn.mysql.com/

下载完成后,解压缩

tar -zxvf mysql-5.6.26.tar.gz

2.安装依赖

yum -y install gcc cmake ncurses-devel bison

3.编译安装

cd mysql-5.6.26

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EMBEDDED_SERVER=1

make && make install

4.创建用户组和用户

groupadd mysql

useradd -r -g mysql mysql

5.修改数据目录权限

chown -R mysql:mysql /usr/local/mysql/data

6.初始化数据库

/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

7.启动服务

/usr/local/mysql/support-files/mysql.server start

8.设置开机启动

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

chmod +x /etc/init.d/mysqld

9.修改root密码

/usr/local/mysql/bin/mysqladmin -u root password '123456'

10.进入mysql

/usr/local/mysql/bin/mysql -uroot -p123456

11.授权远程访问

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

FLUSH PRIVILEGES;

12.安装完成

相关文章