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

Problems in installation and installation of each version of mysql 8.0.18 (essence summary)

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Summary of essence: problem solving record of MYSQL:

No matter how it is installed (rpm or gz or gz.xz), the installation order must be correct, first configure the / etc/my.cfg file, do not create this file first, don't worry, because mysql startup will first find this file as a parameter to start. Then initialize mysql with parameters such as path during initialization, so that the configuration file does not need to be configured. On the contrary, configuration errors lead to startup failure, and configuration such as ignoring password can still be valid after initialization. Other parameters, such as path initialization, cannot be used in my.cfg after being specified, and an error must be reported with restart.

If / etc/my.cfg does not exist, it will first be called here, otherwise $MYSQL_HOME/data or ~ and other places will be called my.cfg.

If prompted during installation

Sudo yum install libstdc++.i686

Error: Protected multilib versions: libstdc+ ±4.4.7-16.el6.i686! = libstdc+ ±4.4.7-11.el6.x86_64

Just execute yum update libstdc+ ±4.4.7-16.el6.x86_64 first.

After initialization, the error still says that mysq pid cannot find it, and so on:

What to consider: whether the path of the configured mysql is authorized, or is it because of the parameter setting problem in the my.cfg that the startup cannot be started?

If mysql starts successfully and can be connected through an ip address or tool, but an error is reported, such as transaction readonly, this consideration

Whether the mysql driver of the release program corresponds to the version of the mysql database

**

Mainly look at the summary above, below is the draft of your own test notes, you can also refer to

**

Install mysql version 8.0.18 rmp centos 6

Rpm-qa | grep mysqlrpm-e mysql / / normal delete mode rpm-e-- nodeps mysql / / forcefully delete mode. If you delete it using the above command, you will be prompted for other dependent files. You can use this command to delete rpm-ivh mysql-community-common-8.0.11-1.el6.x86_64.rpmrpm-ivh mysql-community-libs-8.0.11-1.el6.x86_64.rpmrpm-ivh mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpmrpm-ivh mysql-community-client-8.0.11-1.el6.x86_64.rpmrpm-ivh mysql-community-server-8. 0.11-1.el6.x86_64.rpmmysql-Vservice mysqld start

The default datadir is in / var/lib/mysql/, which can be modified by modifying my.cnf.

Find that you can't log in without a password, so add skip-grant-tables to my.cnf and restart it to reset the password.

Need

Flush privilegesalter user root@'localhost' identified by 'root';service mysqld restartiptables-I INPUT-p tcp-- dport 3306-j ACCEPTshow variables like'% pass%';drop user root@'localhost'create user root@'localhost' identified by 'root';rant all on. To root@'localhost' with grant option;mysql-uroot-p-h292.168.1.193select user,host,plugin from mysql.user

Add: default_authentication_plugin=mysql_native_password to my.cnf

Service mysqld restartmysql > drop user leo;Query OK, 0 rows affected (0.10 sec) mysql > flush privileges;Query OK, 0 rows affected (0.00 sec) mysql > create user leo identified by 'mysql';Query OK, 0 rows affected (0.02 sec) mysql > grant all on. To leo;Query OK, 0 rows affected (0.08 sec) show variables like 'character%';/etc/rc.d/init.d/mysqld-stop

two。 Install the mysql8.0.18 tutorial-centos7 version of https://www.jb51.net/article/175013.htm

Rpm-qa | grep mariadbrpm-e mariadb-libs-5.5.35-3.el7.x86_64-- nodepsrpm-ivh mysql-community-common-8.0.18-1.el7.x86_64.rpmrpm-ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpmrpm-ivh mysql-community-client-8.0.18-1.el7.x86_64.rpmrpm-ivh mysql-community-server-8.0.18-1.el7.x86_64.rpmrpm -qa | grep mysqlchmod-R 777 / var/lib/mysql

First change the configuration file and then start

Configure vim / etc/my.cfg with case

Lower_case_table_names=1character-set-server=utf8mysqld-initialize

Authorization after initialization, otherwise the startup will not succeed

Chmod-R 777 / var/lib/mysqlsystemctl start mysqld enable mysql service systemctl status mysqld to check mysql status cat / var/log/mysqld.log | grep password check root initial password mysql-u root-p # enter the previous initial password that is Iv7fjuP,ucH+ (fill in your own password) ALTER USER "root" @ "localhost" IDENTIFIED BY "root"; FLUSH PRIVILEGES; # effective immediately use mysql;update user set host ='% 'where user =' root' ALTER USER 'root'@'%' IDENTIFIED BY' root' PASSWORD EXPIRE NEVER; # change encryption method ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' root'; # update user password (root here) book

3. Install mysql8.0.18 tutorial-linux Universal unzipped Edition .txt

Https://www.jb51.net/article/177010.htm

First xz-d xxx.tar.xz decompresses the xxx.tar.xz to xxx.tar, and then unpacks it with tar xvf xxx.tar.

Xz-d mysql-8.0.18-linux-glibc2.12-x86_64.tar.xztar-xvf mysql-8.0.18-linux-glibc2.12-x86_64.tarapt-get install lib32stdc++6For Red Hat: sudo yum install libstdc++.i686sudo yum install libstdc+ ±devel.i686mkdir datagroupadd mysqluseradd-g mysql mysqlchown-R mysql.mysql / home/mysql/

Or

Chown-R mysql .chgrp-R mysql .mkdir-p / home/mysql/data/home/mysql/bin/mysqld-- user=mysql-- basedir=/home/mysql-- datadir=/home/mysql/data-- initialize / / initialize the database

Record your temporary password:

Twi=Tlsi

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

Database

Wechat

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

12
Report