Installing mysql 5.7 database in linux

Refer to this big brother's blog, https://blog.csdn.net/qq_37598011/article/details/93489404

Here are my notes according to the blog

3.2 installing and configuring mysql 5.7 for Linux

 

3.2.1. Download

Download:

https://dev.mysql.com/downloads/mysql/5.7.html#downloads

 

 

 

 

3.2.2. Upload to Linux server

Put it under the / myapp directory

Unzip mysql 5.7

  tar -zxvf mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz 

Move the extracted file to / myapp/software/mysql directory

  mv mysql-5.7.36-linux-glibc2.12-x86_64 /myapp/software/mysql

Create mysql user groups and users and modify permissions

 #  1. Create user group
 groupadd mysql
 ​
 # 2. Create a user and put the user into the mysql group
 useradd -r -g mysql mysql

Create a data directory and grant permissions

 #  1. Create data directory
 mkdir -p /data/mysql  
 # 2. Grant permission (Grant mysql user permission to operate / data/mysql directory)
 chown mysql:mysql -R /data/mysql

Configure my.cnf

 vim /etc/my.cnf

First enter i to switch to editable status. When saving and exiting, first click ESC, and then enter: wq save and exit

The complete directory is as follows:

 [mysqld]
 ​
 bind-address=0.0.0.0
 port=3306
 user=mysql
 basedir=/myapp/software/mysql
 ​
 datadir=/data/mysql
 socket=/tmp/mysql.sock
 log-error=/data/mysql/mysql.err
 pid-file=/data/mysql/mysql.pid
 character_set_server=utf8mb4
 ​
 explicit_defaults_for_timestamp=true
 # Disabling symbolic-links is recommended to prevent assorted security risks
 symbolic-links=0
 # Settings user and group are ignored when systemd is used.
 # If you need to run mysqld under a different user or group,
 # customize your systemd unit file for mariadb according to the
 # instructions in http://fedoraproject.org/wiki/Systemd
 ​
 #
 # include all files from the config directory
 #
 !includedir /etc/my.cnf.d
 ​

remarks:

basedir=/myapp/software/mysql is the directory after mysql decompression

user=mysql is the mysql user just created

 

Initialize mysql database

 #  1. Enter the bin directory of mysql
 cd myapp/software/mysql/bin
 ​
 # 2. Initialize mysql database command
 ./mysqld --defaults-file=/etc/my.cnf --basedir=/myapp/software/mysql/ --datadir=/data/mysql/ --user=mysql --initialize

View password

 cat /data/mysql/mysql.err
 [root@192 bin]# cat /data/mysql/mysql.err
 2021-10-29T03:52:36.800587Z 0 [Warning] InnoDB: New log files created, LSN=45790
 2021-10-29T03:52:36.820455Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
 2021-10-29T03:52:36.874433Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a7c106fd-386b-11ec-a788-000c2969c071.
 2021-10-29T03:52:36.875787Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
 2021-10-29T03:52:37.712094Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
 2021-10-29T03:52:37.712103Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
 2021-10-29T03:52:37.712627Z 0 [Warning] CA certificate ca.pem is self signed.
 2021-10-29T03:52:37.914828Z 1 [Note] A temporary password is generated for root@localhost: Blfwsup7hM,t
 ​

The last line is A temporary password is generated for root@localhost: Blfwsup7hM,t

The password is Blfwsup7hM,t

 

Start mysql and change the root password

 #  First place mysql.server in / etc/init.d/mysql
 cp /myapp/software/mysql/support-files/mysql.server /etc/init.d/mysql

 

start-up

 #  mysql start 
 service mysql start
 ​
  See ` ` Starting MySQL. SUCCESS`` It means that the startup is successful!
 ​
 # Verify whether mysql is started successfully
  ps -ef|grep mysql
 root     128836      1  0 20:56 pts/0    00:00:00 /bin/sh /myapp/software/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/mysql.pid
 mysql    129063 128836  1 20:56 pts/0    00:00:00 /myapp/software/mysql/bin/mysqld --basedir=/myapp/software/mysql --datadir=/data/mysql --plugin-dir=/myapp/software/mysql/lib/plugin --user=mysql --log-error=/data/mysql/mysql.err --pid-file=/data/mysql/mysql.pid --socket=/tmp/mysql.sock --port=3306
 root     130061   4616  0 20:56 pts/0    00:00:00 grep --color=auto mysql
 ​

 

Here, you have successfully installed and started the mysql database!

 

Modify the root password of mysql

The previous password is randomly generated

 # Note: modify it under the bin directory of mysql:
 ./mysql -u root -p

You'll see the following and log in again

 Enter password: 
 Welcome to the MySQL monitor. Commands end with ; or \g.
 Your MySQL connection id is 3
 Server version: 5.7.36
 ​
 Copyright (c) 2000, 2021, Oracle and/or its affiliates.
 ​
 Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.
 ​
 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 ​
 mysql>

 

Perform the following three steps

 #  1. Set the password of root user as 123456
 SET PASSWORD = PASSWORD('123456');
 # 2. Modify the user's password and never expire
 ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
 # 3. Make the amendment effective
 FLUSH PRIVILEGES;

 

At this time, if the remote connection fails, the Host '' is not allowed to connect to this Mysql Server will be prompted

Settings can be accessed remotely

 #  1. Using mysql database
 use mysql
 # 2. Enable the root user to access any host again
 update user set host = '%' where user = 'root';
 # 3. Refresh to make the modification effective
 FLUSH PRIVILEGES;

 

be careful:

If I use root to create a user in navicat, such as mysql02, I want mysql02 to be accessible from any host

Command:

  update user set host = '%' where user = 'mysql01';

Or when creating a user in navicat, set the user's host to%

 

------------------------

linux   The operation records in are shown below


[root@192 myapp]# tar -zxvf mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz mysql-5.7.36-linux-glibc2.12-x86_64/bin/myisam_ftdump mysql-5.7.36-linux-glibc2.12-x86_64/bin/myisamchk mysql-5.7.36-linux-glibc2.12-x86_64/bin/myisamlog mysql-5.7.36-linux-glibc2.12-x86_64/bin/myisampack mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_client_test_embedded mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_config_editor mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_embedded mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_install_db mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_plugin mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_secure_installation mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_ssl_rsa_setup mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_tzinfo_to_sql mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_upgrade mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqladmin mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlbinlog mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlcheck mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqldump mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlimport mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlpump mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlshow mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlslap mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqltest_embedded mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqlxtest mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqld-debug mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqld-debug.a mysql-5.7.36-linux-glibc2.12-x86_64/include/mysqlx_ername.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysqlx_error.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysqlx_version.h mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysql_config mysql-5.7.36-linux-glibc2.12-x86_64/include/big_endian.h mysql-5.7.36-linux-glibc2.12-x86_64/include/binary_log_types.h mysql-5.7.36-linux-glibc2.12-x86_64/include/byte_order_generic.h mysql-5.7.36-linux-glibc2.12-x86_64/include/byte_order_generic_x86.h mysql-5.7.36-linux-glibc2.12-x86_64/include/decimal.h mysql-5.7.36-linux-glibc2.12-x86_64/include/errmsg.h mysql-5.7.36-linux-glibc2.12-x86_64/include/keycache.h mysql-5.7.36-linux-glibc2.12-x86_64/include/little_endian.h mysql-5.7.36-linux-glibc2.12-x86_64/include/m_ctype.h mysql-5.7.36-linux-glibc2.12-x86_64/include/m_string.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_alloc.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_byteorder.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_command.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_compiler.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_config.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_dbug.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_dir.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_getopt.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_global.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_list.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_sys.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_thread.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_thread_local.h mysql-5.7.36-linux-glibc2.12-x86_64/include/my_xml.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/client_authentication.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/client_plugin.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/client_plugin.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/com_data.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/get_password.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/group_replication_priv.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/innodb_priv.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/mysql_lex_string.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_audit.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_audit.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_auth.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_auth.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_auth_common.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_ftparser.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_ftparser.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_group_replication.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_keyring.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_keyring.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_trace.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/plugin_validate_password.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_file.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_idle.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_mdl.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_memory.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_ps.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_socket.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_sp.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_stage.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_statement.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_table.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_thread.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/mysql_transaction.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/psi.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/psi_base.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/psi/psi_memory.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_command.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_locking.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_my_plugin_log.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_my_snprintf.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_mysql_alloc.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_mysql_keyring.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_mysql_password_policy.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_mysql_string.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_parser.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_rpl_transaction_ctx.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_rpl_transaction_write_set.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_rules_table.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_security_context.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_srv_session.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_srv_session_info.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_ssl_wrapper.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_thd_alloc.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_thd_engine_lock.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_thd_wait.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/service_thread_scheduler.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/services.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/services.h.pp mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/thread_pool_priv.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql/thread_type.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql_com.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql_com_server.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql_embed.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql_time.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysql_version.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysqld_ername.h mysql-5.7.36-linux-glibc2.12-x86_64/include/mysqld_error.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin_audit.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin_ftparser.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin_group_replication.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin_keyring.h mysql-5.7.36-linux-glibc2.12-x86_64/include/plugin_validate_password.h mysql-5.7.36-linux-glibc2.12-x86_64/include/sql_common.h mysql-5.7.36-linux-glibc2.12-x86_64/include/sql_state.h mysql-5.7.36-linux-glibc2.12-x86_64/include/sslopt-case.h mysql-5.7.36-linux-glibc2.12-x86_64/include/sslopt-longopts.h mysql-5.7.36-linux-glibc2.12-x86_64/include/sslopt-vars.h mysql-5.7.36-linux-glibc2.12-x86_64/include/thr_cond.h mysql-5.7.36-linux-glibc2.12-x86_64/include/thr_mutex.h mysql-5.7.36-linux-glibc2.12-x86_64/include/thr_rwlock.h mysql-5.7.36-linux-glibc2.12-x86_64/include/typelib.h mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqlclient.a mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqlservices.a mysql-5.7.36-linux-glibc2.12-x86_64/lib/pkgconfig/mysqlclient.pc mysql-5.7.36-linux-glibc2.12-x86_64/share/aclocal/mysql.m4 mysql-5.7.36-linux-glibc2.12-x86_64/docs/ChangeLog mysql-5.7.36-linux-glibc2.12-x86_64/docs/INFO_SRC mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqld.a mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/comp_err.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/innochecksum.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/lz4_decompress.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/my_print_defaults.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/myisam_ftdump.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/myisamchk.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/myisamlog.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/myisampack.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql.server.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_config.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_config_editor.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_install_db.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_plugin.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_secure_installation.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_ssl_rsa_setup.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_tzinfo_to_sql.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysql_upgrade.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqladmin.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlbinlog.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlcheck.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqld_multi.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqld_safe.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqldump.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqldumpslow.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlimport.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlman.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlpump.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlshow.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/mysqlslap.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/perror.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/replace.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/resolve_stack_dump.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/resolveip.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man1/zlib_decompress.1 mysql-5.7.36-linux-glibc2.12-x86_64/man/man8/mysqld.8 mysql-5.7.36-linux-glibc2.12-x86_64/LICENSE mysql-5.7.36-linux-glibc2.12-x86_64/README mysql-5.7.36-linux-glibc2.12-x86_64/bin/innochecksum mysql-5.7.36-linux-glibc2.12-x86_64/bin/lz4_decompress mysql-5.7.36-linux-glibc2.12-x86_64/bin/my_print_defaults mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqld mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqld_multi mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqld_safe mysql-5.7.36-linux-glibc2.12-x86_64/bin/mysqldumpslow mysql-5.7.36-linux-glibc2.12-x86_64/bin/perror mysql-5.7.36-linux-glibc2.12-x86_64/bin/replace mysql-5.7.36-linux-glibc2.12-x86_64/bin/resolve_stack_dump mysql-5.7.36-linux-glibc2.12-x86_64/bin/resolveip mysql-5.7.36-linux-glibc2.12-x86_64/bin/zlib_decompress mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/char.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/dicrc mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/left-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/matrix.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/pos-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/rewrite.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/right-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/sys.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/unk.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/char.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/dicrc mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/left-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/matrix.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/pos-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/rewrite.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/right-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/sys.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/unk.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/char.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/dicrc mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/left-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/matrix.bin mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/pos-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/rewrite.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/right-id.def mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/sys.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/unk.dic mysql-5.7.36-linux-glibc2.12-x86_64/lib/mecab/etc/mecabrc mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/adt_null.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/auth_socket.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/authentication_ldap_sasl_client.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/connection_control.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/adt_null.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/auth_socket.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/authentication_ldap_sasl_client.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/connection_control.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/group_replication.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/ha_example.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/innodb_engine.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/keyring_file.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/keyring_udf.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libmemcached.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libpluginmecab.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_framework.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_services.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_services_threaded.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_detach.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_in_thd.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_info.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_2_sessions.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_all_col_types.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_cmds_1.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_commit.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_complex.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_errors.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_lock.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_processlist.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_replication.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_shutdown.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_sqlmode.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_stored_procedures_functions.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_views_triggers.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_x_sessions_deinit.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_x_sessions_init.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/locking_service.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/mypluglib.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/mysql_no_login.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/mysqlx.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/rewrite_example.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/rewriter.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/semisync_master.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/semisync_slave.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/test_security_context.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/test_udf_services.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/validate_password.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/debug/version_token.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/group_replication.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/ha_example.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/innodb_engine.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/keyring_file.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/keyring_udf.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libmemcached.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libpluginmecab.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_framework.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_services.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_services_threaded.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_session_detach.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_session_in_thd.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_session_info.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_2_sessions.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_all_col_types.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_cmds_1.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_commit.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_complex.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_errors.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_lock.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_processlist.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_replication.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_shutdown.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_sqlmode.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_stored_procedures_functions.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_views_triggers.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_x_sessions_deinit.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/libtest_x_sessions_init.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/locking_service.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/mypluglib.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/mysql_no_login.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/mysqlx.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/rewrite_example.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/rewriter.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/semisync_master.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/semisync_slave.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/test_security_context.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/test_udf_services.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/validate_password.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/plugin/version_token.so mysql-5.7.36-linux-glibc2.12-x86_64/share/bulgarian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/Index.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/README mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/armscii8.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/ascii.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp1250.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp1251.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp1256.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp1257.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp850.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp852.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/cp866.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/dec8.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/geostd8.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/greek.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/hebrew.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/hp8.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/keybcs2.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/koi8r.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/koi8u.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/latin1.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/latin2.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/latin5.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/latin7.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/macce.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/macroman.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/charsets/swe7.xml mysql-5.7.36-linux-glibc2.12-x86_64/share/czech/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/danish/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/dictionary.txt mysql-5.7.36-linux-glibc2.12-x86_64/share/dutch/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/english/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/errmsg-utf8.txt mysql-5.7.36-linux-glibc2.12-x86_64/share/estonian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/fill_help_tables.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/french/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/german/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/greek/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/hungarian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/innodb_memcached_config.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/italian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/japanese/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/korean/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/mysql_security_commands.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/mysql_sys_schema.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/mysql_system_tables.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/mysql_system_tables_data.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/mysql_test_data_timezone.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/norwegian-ny/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/norwegian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/polish/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/portuguese/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/romanian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/russian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/serbian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/slovak/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/spanish/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/swedish/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/share/ukrainian/errmsg.sys mysql-5.7.36-linux-glibc2.12-x86_64/support-files/mysql-log-rotate mysql-5.7.36-linux-glibc2.12-x86_64/support-files/mysqld_multi.server mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqlclient.so mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqlclient.so.20 mysql-5.7.36-linux-glibc2.12-x86_64/lib/libmysqlclient.so.20.3.23 mysql-5.7.36-linux-glibc2.12-x86_64/share/install_rewriter.sql mysql-5.7.36-linux-glibc2.12-x86_64/share/uninstall_rewriter.sql mysql-5.7.36-linux-glibc2.12-x86_64/support-files/magic mysql-5.7.36-linux-glibc2.12-x86_64/support-files/mysql.server mysql-5.7.36-linux-glibc2.12-x86_64/docs/INFO_BIN mysql-5.7.36-linux-glibc2.12-x86_64/docs/INFO_SRC [root@192 myapp]# ls jdk-8u291-linux-x64.tar.gz mysql-5.7.36-linux-glibc2.12-x86_64 software mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz [root@192 myapp]# ll Total consumption 1113344 -rw-rw-r--. 1 wanglichao wanglichao 144935989 10 July 27-21:28 jdk-8u291-linux-x64.tar.gz -rw-rw-r--. 1 wanglichao wanglichao 328563044 10 June 28-20:14 mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz drwxr-xr-x. 9 root root 129 10 June 28-20:28 mysql-5.7.36-linux-glibc2.12-x86_64 -rw-rw-r--. 1 wanglichao wanglichao 666559924 10 June 28-20:28 mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz drwxrwxr-x. 4 wanglichao wanglichao 69 10 June 28-20:15 software [root@192 myapp]# mv mysql-5.7.36-linux-glibc2.12-x86_64 /myapp/software/mysql [root@192 myapp]# mkdir -p /data/mysql [root@192 myapp]# ll Total consumption 1113344 -rw-rw-r--. 1 wanglichao wanglichao 144935989 10 July 27-21:28 jdk-8u291-linux-x64.tar.gz -rw-rw-r--. 1 wanglichao wanglichao 328563044 10 June 28-20:14 mysql-5.6.40-linux-glibc2.12-x86_64.tar.gz -rw-rw-r--. 1 wanglichao wanglichao 666559924 10 June 28-20:28 mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz drwxrwxr-x. 5 wanglichao wanglichao 82 10 June 28-20:30 software [root@192 myapp]# cd ../ [root@192 /]# ll Total consumption 24 lrwxrwxrwx. 1 root root 7 10 June 27-20:52 bin -> usr/bin dr-xr-xr-x. 5 root root 4096 10 June 27-20:59 boot drwxr-xr-x. 3 root root 19 10 June 28-20:35 data drwxr-xr-x. 20 root root 3320 10 June 28-19:53 dev drwxr-xr-x. 144 root root 8192 10 June 28-20:16 etc drwxr-xr-x. 3 root root 24 10 June 27-20:58 home lrwxrwxrwx. 1 root root 7 10 June 27-20:52 lib -> usr/lib lrwxrwxrwx. 1 root root 9 10 June 27-20:52 lib64 -> usr/lib64 drwxr-xr-x. 2 root root 6 4 October 2018 media drwxr-xr-x. 2 root root 6 4 October 2018 mnt drwxrwxr-x. 3 wanglichao wanglichao 156 10 June 28-20:30 myapp drwxrw----. 3 wanglichao wanglichao 16 10 June 27-20:55 opt dr-xr-xr-x. 239 root root 0 10 June 28-19:53 proc dr-xr-x---. 4 root root 203 10 June 28-18:24 root drwxr-xr-x. 43 root root 1260 10 June 28-19:56 run lrwxrwxrwx. 1 root root 8 10 June 27-20:52 sbin -> usr/sbin drwxr-xr-x. 2 root root 6 4 October 2018 srv dr-xr-xr-x. 13 root root 0 10 June 28-19:53 sys drwxrwxrwt. 25 root root 4096 10 June 28-20:30 tmp drwxr-xr-x. 14 root root 167 10 July 27-21:12 usr drwxr-xr-x. 21 root root 4096 10 June 27-20:59 var [root@192 /]# cd data [root@192 data]# ls mysql [root@192 data]# cd ../ [root@192 /]# ll Total consumption 24 lrwxrwxrwx. 1 root root 7 10 June 27-20:52 bin -> usr/bin dr-xr-xr-x. 5 root root 4096 10 June 27-20:59 boot drwxr-xr-x. 3 root root 19 10 June 28-20:35 data drwxr-xr-x. 20 root root 3320 10 June 28-19:53 dev drwxr-xr-x. 144 root root 8192 10 June 28-20:16 etc drwxr-xr-x. 3 root root 24 10 June 27-20:58 home lrwxrwxrwx. 1 root root 7 10 June 27-20:52 lib -> usr/lib lrwxrwxrwx. 1 root root 9 10 June 27-20:52 lib64 -> usr/lib64 drwxr-xr-x. 2 root root 6 4 October 2018 media drwxr-xr-x. 2 root root 6 4 October 2018 mnt drwxrwxr-x. 3 wanglichao wanglichao 156 10 June 28-20:30 myapp drwxrw----. 3 wanglichao wanglichao 16 10 June 27-20:55 opt dr-xr-xr-x. 239 root root 0 10 June 28-19:53 proc dr-xr-x---. 4 root root 203 10 June 28-18:24 root drwxr-xr-x. 43 root root 1260 10 June 28-19:56 run lrwxrwxrwx. 1 root root 8 10 June 27-20:52 sbin -> usr/sbin drwxr-xr-x. 2 root root 6 4 October 2018 srv dr-xr-xr-x. 13 root root 0 10 June 28-19:53 sys drwxrwxrwt. 25 root root 4096 10 June 28-20:30 tmp drwxr-xr-x. 14 root root 167 10 July 27-21:12 usr drwxr-xr-x. 21 root root 4096 10 June 27-20:59 var [root@192 /]# chown mysql:mysql -R /data/mysql [root@192 /]# cd /data/mysql [root@192 mysql]# ls [root@192 mysql]# ll Total consumption 0 [root@192 mysql]# cd ../ [root@192 data]# ll Total consumption 0 drwxr-xr-x. 2 mysql mysql 6 10 June 28-20:35 mysql [root@192 data]# cd ../ [root@192 /]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d [root@192 /]# vim /etc/my.cnf [root@192 /]# cd myapp/software/mysql [root@192 mysql]# ls bin docs include lib LICENSE man README share support-files [root@192 mysql]# ll Total consumption 272 drwxr-xr-x. 2 root root 4096 10 June 28-20:28 bin drwxr-xr-x. 2 root root 55 10 June 28-20:28 docs drwxr-xr-x. 3 root root 4096 10 June 28-20:28 include drwxr-xr-x. 5 root root 230 10 June 28-20:28 lib -rw-r--r--. 1 7161 31415 259199 9 June 22:26 LICENSE drwxr-xr-x. 4 root root 30 10 June 28-20:28 man -rw-r--r--. 1 7161 31415 566 9 June 22:26 README drwxr-xr-x. 28 root root 4096 10 June 28-20:28 share drwxr-xr-x. 2 root root 90 10 June 28-20:28 support-files [root@192 mysql]# cd bin [root@192 bin]# ls innochecksum mysqladmin mysqld_multi mysqlpump mysqlxtest lz4_decompress mysqlbinlog mysqld_safe mysql_secure_installation perror myisamchk mysqlcheck mysqldump mysqlshow replace myisam_ftdump mysql_client_test_embedded mysqldumpslow mysqlslap resolveip myisamlog mysql_config mysql_embedded mysql_ssl_rsa_setup resolve_stack_dump myisampack mysql_config_editor mysqlimport mysqltest_embedded zlib_decompress my_print_defaults mysqld mysql_install_db mysql_tzinfo_to_sql mysql mysqld-debug mysql_plugin mysql_upgrade [root@192 bin]# ll Total consumption 1348160 -rwxr-xr-x. 1 7161 31415 8147275 9 July 00:47 innochecksum -rwxr-xr-x. 1 7161 31415 359769 9 July 00:46 lz4_decompress -rwxr-xr-x. 1 7161 31415 10101581 9 July 00:47 myisamchk -rwxr-xr-x. 1 7161 31415 9642658 9 July 00:47 myisam_ftdump -rwxr-xr-x. 1 7161 31415 7539128 9 July 00:47 myisamlog -rwxr-xr-x. 1 7161 31415 9769178 9 July 00:47 myisampack -rwxr-xr-x. 1 7161 31415 7435495 9 July 00:46 my_print_defaults -rwxr-xr-x. 1 7161 31415 10456480 9 July 00:47 mysql -rwxr-xr-x. 1 7161 31415 9284722 9 July 00:47 mysqladmin -rwxr-xr-x. 1 7161 31415 11275310 9 July 00:47 mysqlbinlog -rwxr-xr-x. 1 7161 31415 9657634 9 July 00:47 mysqlcheck -rwxr-xr-x. 1 7161 31415 219351526 9 July 00:51 mysql_client_test_embedded -rwxr-xr-x. 1 7161 31415 5224 9 July 00:46 mysql_config -rwxr-xr-x. 1 7161 31415 7614500 9 July 00:47 mysql_config_editor -rwxr-xr-x. 1 7161 31415 254721363 9 July 00:51 mysqld -rwxr-xr-x. 1 7161 31415 207846652 9 July 00:45 mysqld-debug -rwxr-xr-x. 1 7161 31415 27118 9 July 00:46 mysqld_multi -rwxr-xr-x. 1 7161 31415 27836 9 July 00:46 mysqld_safe -rwxr-xr-x. 1 7161 31415 9560756 9 July 00:47 mysqldump -rwxr-xr-x. 1 7161 31415 7844 9 July 00:46 mysqldumpslow -rwxr-xr-x. 1 7161 31415 218929598 9 July 00:51 mysql_embedded -rwxr-xr-x. 1 7161 31415 9307783 9 July 00:47 mysqlimport -rwxr-xr-x. 1 7161 31415 9769188 9 July 00:47 mysql_install_db -rwxr-xr-x. 1 7161 31415 7500392 9 July 00:47 mysql_plugin -rwxr-xr-x. 1 7161 31415 17682531 9 July 00:47 mysqlpump -rwxr-xr-x. 1 7161 31415 9237727 9 July 00:47 mysql_secure_installation -rwxr-xr-x. 1 7161 31415 9245140 9 July 00:47 mysqlshow -rwxr-xr-x. 1 7161 31415 9349690 9 July 00:47 mysqlslap -rwxr-xr-x. 1 7161 31415 7823435 9 July 00:46 mysql_ssl_rsa_setup -rwxr-xr-x. 1 7161 31415 218498862 9 July 00:51 mysqltest_embedded -rwxr-xr-x. 1 7161 31415 5140450 9 July 00:46 mysql_tzinfo_to_sql -rwxr-xr-x. 1 7161 31415 12501318 9 July 00:47 mysql_upgrade -rwxr-xr-x. 1 7161 31415 24601564 9 July 00:47 mysqlxtest -rwxr-xr-x. 1 7161 31415 7578442 9 July 00:47 perror -rwxr-xr-x. 1 7161 31415 5358815 9 July 00:46 replace -rwxr-xr-x. 1 7161 31415 7435037 9 July 00:46 resolveip -rwxr-xr-x. 1 7161 31415 7521201 9 July 00:46 resolve_stack_dump -rwxr-xr-x. 1 7161 31415 114075 9 July 00:46 zlib_decompress [root@192 bin]# ./mysqld --defaults-file=/etc/my.cnf --basedir=/myapp/software/mysql/ --datadir=/data/mysql/ --user=mysql --initialize [root@192 bin]# [root@192 bin]# cat /data/mysql/mysql.err 2021-10-29T03:52:36.800587Z 0 [Warning] InnoDB: New log files created, LSN=45790 2021-10-29T03:52:36.820455Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2021-10-29T03:52:36.874433Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a7c106fd-386b-11ec-a788-000c2969c071. 2021-10-29T03:52:36.875787Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2021-10-29T03:52:37.712094Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher. 2021-10-29T03:52:37.712103Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher. 2021-10-29T03:52:37.712627Z 0 [Warning] CA certificate ca.pem is self signed. 2021-10-29T03:52:37.914828Z 1 [Note] A temporary password is generated for root@localhost: Blfwsup7hM,t [root@192 bin]# cp /myapp/software/mysql/support-files/mysql.server /etc/init.d/mysql [root@192 bin]# service mysql start Starting MySQL. SUCCESS! [root@192 bin]# ps -ef|grep mysql root 128836 1 0 20:56 pts/0 00:00:00 /bin/sh /myapp/software/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/mysql.pid mysql 129063 128836 1 20:56 pts/0 00:00:00 /myapp/software/mysql/bin/mysqld --basedir=/myapp/software/mysql --datadir=/data/mysql --plugin-dir=/myapp/software/mysql/lib/plugin --user=mysql --log-error=/data/mysql/mysql.err --pid-file=/data/mysql/mysql.pid --socket=/tmp/mysql.sock --port=3306 root 130061 4616 0 20:56 pts/0 00:00:00 grep --color=auto mysql [root@192 bin]# ./mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [root@192 bin]# ./mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.36 Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SET PASSWORD = PASSWORD('123456'); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> update user set host = '%' where user = 'root'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> update user set host = '%' where user = 'mysql01'; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql>

  

 

Posted by meltingpoint on Thu, 28 Oct 2021 22:30:13 -0700