Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Operation methods of mysql8.0.11 installation, Startup and basic setup

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following is about the operation of mysql8.0.11 installation, startup and basic settings. The secret of the text lies in being close to the topic. So, no gossip, let's go straight to the following, I believe you will benefit from reading this article on how to install, start and set up mysql8.0.11.

This demonstration is about the installation, startup, and basic setup of mysql 8.0.11. Download mysql-8.0.11-el7-x86_64.tar.gz

1. Decompress and rename

[root@localhost ~] # cd / data

[root@localhost data] # ls

Mysql-8.0.11-el7-x86_64.tar.gz

[root@localhost data] # tar-zxf mysql-8.0.11-el7-x86_64.tar.gz

[root@localhost data] # mv mysql-8.0.11-el7-x86_64 mysql

2. Create mysql users

[root@localhost data] # useradd-M-s / sbin/nologin mysql

3. Initialize the database

[root@localhost data] # cd mysql/

[root@localhost mysql] # / bin/mysqld-- initialize-- user=mysql-- datadir=/data/mysql/data

2018-04-26T03:06:01.637456Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using-- skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.

2018-04-26T03:06:01.637709Z 0 [System] [MY-013169] [Server] / data/mysql/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 53030

2018-04-26T03:06:17.384428Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: * wbnbphswv8 > K* this is the database initial password 2018-04-26T03:06:26.959938Z 0 [System] [MY-013170] [Server] / data/mysql/bin/mysqld (mysqld 8.0.11) initializing of server has completed

4. Edit the configuration file

[root@localhost mysql] # vim / etc/my.cnf

[client]

Port = 3306

Socket = / tmp/mysql.sock

[mysqld] datadir=/data/mysql/data socket=/tmp/mysql.sock port=3306 user=mysql basedir=/data/mysql symbolic-links=0 [mysqld_safe] log-error=/data/mysql/data/error.log pid-file=/data/mysql/data/mysql.pid

5. Start

[root@localhost mysql] # / bin/mysqld-- defaults-file=/etc/my.cnf &

[1] 53216

[root@localhost mysql] # 2018-04-26T03:18:05.050872Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using-- skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.

2018-04-26T03:18:05.051064Z 0 [System] [MY-010116] [Server] / data/mysql/bin/mysqld (mysqld 8.0.11) starting as process 53216

2018-04-26T03:18:06.208674Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2018-04-26T03:18:06.240611Z 0 [System] [MY-010931] [Server] / data/mysql/bin/mysqld: ready for connections. Version: '8.0.11' socket:' / tmp/mysql.sock' port: 3306 MySQL Community Server-GPL.

6. View the process

[root@localhost mysql] # ps aux | grep mysql

Qiang 10783 0.00.2 165020 4452 pts/0 S+ 14:38 0:00 / data/mysql/bin/mysql-uroot-p

Qiang 12866 0.0 112664 972 pts/1 R + 15:19 0:00 grep-color=auto mysql

Root 14040 0.0 0.0 113252 1528? S August 07 0:00 / bin/sh / data/mysql/bin/mysqld_safe-- datadir=/data/mysql/data-- pid-file=/data/mysql/data/baobao.pid

Mysql 14231 0.3 20.3 1365424 382536? Sl 07 14:47 / data/mysql/bin/mysqld-- basedir=/data/mysq-- datadir=/data/mysql/data-- plugin-dir=/data/mysql/lib/plugin-- user=mysql-- log-error=/data/mysql/data/mysql_error.log-- pid-file=/data/mysql/data/baobao.pid-- socket=/tmp/mysql.sock-- port=13306

7. Set up the startup script

[root@localhost mysql] # cp. / support-files/mysql.server / etc/init.d/mysqld

Modify startup parameters

[root@localhost mysql] # vi / etc/init.d/mysqld

Basedir=/data/mysql

Datadir=/data/mysql/data

8. Shut down and start

Stop it

[root@localhost data] # / etc/init.d/mysqld stop

Shutting down MySQL... SUCCESS!

Start

[root@localhost ~] # / etc/init.d/mysqld start

Starting MySQL.... SUCCESS!

9. Simple database settings

[root@localhost mysql] #. / bin/mysql-uroot-p

Enter password: wbnbphswv8 > K

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 9

Server version: 8.0.11

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. 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 > show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. Mysql > alter user root@localhost identified by '123123; Query OK, 0 rows affected (0.14 sec) mysql > show databases +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | +-+ 4 rows in set (0.10 sec)

Mysql >

Is there anything you don't understand about the above mysql8.0.11 installation, startup and basic setup operations? Or if you want to know more about it, you can continue to follow our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report