[Linux environment] Centos install mysql5.7.26 report./mysqld: error while loading shared libraries: libaio.so.1: cannot op

In the process of installing MySQL on the Linux server, after unzipping and modifying the configuration file, the database initialization is reported. / mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory error.

Running the command : ./ mysqld --defaults-file = /  etc / my.cnf --basedir = / usr / local / mysql / --datadir = / data / mysql / --user = mysql --initialize after packets The following error:

Reported./mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory table of Contents.

According to the prompt message, check whether there is this libaio library on the server, and check whether the link library file is installed and used. The command is as follows:

Command:  rpm -qa|grep libaio   

After running this command, it is found that there is no such link library file in the system:

命令:yum install  libaio-devel.x86_64

After executing this command, a selection will be made in the middle.  Is this ok [y/d/N]: Just type y. The word Complete! will appear at the end, indicating that the installation was successful .

Continue to run the database initialization command, prompting success. 

Execute the command to initialize the database again: ./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/mysql/ --user=mysql --initialize 

 As shown in the figure below after success:

 

end!

Guess you like

Origin blog.csdn.net/weixin_44299027/article/details/110734469