# mysql **Repository Path**: wu-leilei/mysql ## Basic Information - **Project Name**: mysql - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 60 - **Created**: 2024-04-29 - **Last Updated**: 2024-04-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 1. 说明 mysql 8.0.25 版本是基于openEuler-20.03-LTS-SP1分支8.0.26版本修改, 在openEuler-24.03-LTS环境编译 ### 2. 验证 ![安装验证](https://foruda.gitee.com/images/1714359076147985124/daf6ffe9_8645027.png "屏幕截图") ![卸载验证](https://foruda.gitee.com/images/1714359100743195123/0df145bd_8645027.png "屏幕截图") ![命令验证1](https://foruda.gitee.com/images/1714359193678543444/55ccc35b_8645027.png "屏幕截图") ![命令验证2](https://foruda.gitee.com/images/1714359233168704834/e5c7755e_8645027.png "屏幕截图") ![服务启动验证](https://foruda.gitee.com/images/1714359258072045806/7fd03b73_8645027.png "屏幕截图") ![服务卸载验证](https://foruda.gitee.com/images/1714359276190746837/87813c0b_8645027.png "屏幕截图") ### 3. 服务配置 ``` systemctl stop firewalld systemctl disable firewalld groupadd mysql useradd -g mysql mysql passwd --stdin mysql mkdir -p /data/mysql cd /data/mysql mkdir data tmp run log touch {/data/mysql/log/mysql.log,/data/mysql/run/mysqld.pid} chown -R mysql:mysql /data touch /etc/my.cnf echo "[mysqld_safe] log-error=/data/mysql/log/mysql.log pid-file=/data/mysql/run/mysqld.pid [mysqldump] quick [mysql] no-auto-rehash [client] default-character-set=utf8 [mysqld] basedir=/usr/local/mysql socket=/data/mysql/run/mysql.sock tmpdir=/data/mysql/tmp datadir=/data/mysql/data default_authentication_plugin=mysql_native_password port=3306 user=mysql" >/etc/my.cnf chown mysql:mysql /etc/my.cnf echo export PATH=${PATH}:/usr/local/mysql/bin >>/etc/profile source /etc/profile rm -rf /data/mysql/data mysqld --initialize --basedir=/usr/local/mysql/ --datadir=/data/mysql/data --user=mysql systemctl daemon-reload systemctl start mysql ```