Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    86372915

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

Download and unzip

wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.26-linux-glibc2.12-x86_64.tar.xz

tar xvf mysql-8.0.26-linux-glibc2.12-x86_64.tar.xz

mv mysql-8.0.26-linux-glibc2.12-x86_64 mysql e4ymcadw4r44551.jpg

Enter the /USR/LOCAL directory, create users and user groups and authorize them

cd /usr/local/

groupadd mysql

useradd -r -g mysql mysql

cd mysql/#Note: Enter the mysql file to authorize all files

chown -R mysql:mysql ./115cl5bp5ft4554.jpg

Users who modify the current directory of /USR/LOCAL/MYSQL

chown -R root:root ./#Note: Be sure to enter the /usr/local/mysql directory

chown -R mysql:mysql data

Initialize the database

bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data record initial password 4hnqixmpxfs4574.jpg

Configure my.cnf

Where the content of my.cnf configuration is:

[mysqld]

character_set_server=utf8mb4

basedir=/usr/local/mysql

datadir=/usr/local/mysql/data

log-error=/usr/local/mysql/data/error.log

pid-file=/usr/local/mysql/data/mysql.pid

port=3306

server_id=1

socket=/tmp/mysql.sock

skip-name-resolve

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Set the power-on start

cd support-files/

cp mysql.server /etc/init.d/mysql

chmod +x /etc/init.d/mysql

Register service

chkconfig --add mysql

ETC/LD.SO.CONF must configure the path, otherwise an error will be reported

vim /etc/ld.so.conf

#Add the following content :

/usr/local/mysql/lib

Configure environment variables

vim /etc/profile

#Add the following content:

MYSQL_HOME=/usr/local/mysql

PATH=$MYSQL_HOME/bin:$MYSQL_HOME/lib:$PATH

export PATH

source /etc/profile #Note: Be sure to execute this command, otherwise the configuration will be invalid mnthxvlvs4k4600.jpg

Start the service

service mysql start If mysql runs an error, you can directly view the error log in the log-error=/usr/local/mysql/data/error.log directory

Log in with the initialization password mq4b0bsoaii4638.jpg

Modify ROOT password

ALTER USER USER() IDENTIFIED BY '123456789@@';

#Modify password later

use mysql;

update user set password=password('lnds12345@@') where user='root';

flush privileges;##Refresh permissions i4xkirnaxnp4677.jpg

This way mysql is done.