您的位置:首页 > 数据库 > MySQL

安装二进制软件包的mysql出现 error while loading shared libraries: libaio.so.1:

2015-08-25 17:07 701 查看
在安装二进制mysql的软件包时(版本mysql-5.5.44),初始化中出现 error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory的错误:
[root@example.com mysql]# scripts/mysql_install_db --datadir=/data/mydata --user=mysql
Installing MySQL system tables...
./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Installation of system tables failed! Examine the logs in
/data/mydata for more information.

You can try to start the mysqld daemon with:

shell> ./bin/mysqld --skip-grant &

and use the command line tool ./bin/mysql
to connect to the mysql database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /data/mydata that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before submitting a bug report
at http://bugs.mysql.com/

解决方法:
[root@example.com data]# yum install -y libaio //安装后在初始化就OK了
[root@example.com mysql]# scripts/mysql_install_db --datadir=/data/mydata --user=mysql
Installing MySQL system tables...
150804 18:53:23 [Note] ./bin/mysqld (mysqld 5.5.44) starting as process 1660 ...
OK
Filling help tables...
150804 18:53:24 [Note] ./bin/mysqld (mysqld 5.5.44) starting as process 1667 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h example.com password 'new-password'

Alternatively you can run:
./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql error while l