我已经设置了一台 Ubuntu 服务器,并想安装 MySQL 5.5。我一直在关注这些MySQL 文档脚步。
我已经libaio dev
安装了。一切都很顺利,直到我运行
bin/mysqld_safe --user=mysql &
它输出以下内容并保留提示。
111130 12:57:44 mysqld_safe Logging to '/usr/local/mysql/data/host_name.err'.
111130 12:57:44 mysqld_safe 使用来自 /usr/local/mysql/data 的数据库启动 mysqld 守护进程
它遇到了问题并且再也没有返回到 shell。 的输出mysqld_safe
记录到/usr/local/mysql/data/host_name.err
。
I /usr/local/mysql/data/loft1551.host_name.err Row 29 Col 1 1:00 Ctrl-K H for help
111130 12:57:44 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
111130 12:57:44 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
111130 12:57:45 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
111130 12:57:45 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
111130 12:57:46 InnoDB: Waiting for the background threads to start
111130 12:57:47 InnoDB: 1.1.8 started; log sequence number 0
111130 12:57:48 [Note] Event Scheduler: Loaded 0 events
111130 12:57:48 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.17-log' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
已经有/tmp/mysql.sock了[mysqld]
,[client]
所以我在下面添加了[mysqld]
datadir =/usr/local/mysql/data
但仍然遇到同样的问题我在这里遗漏了什么?
感谢您阅读本文并提供帮助
答案1
当它运行时我建议获取:
ps -fLu mysql
我建议尝试strace
对 mysqld_safe 进程执行一些操作,看看它在等待什么才能退出。它可能正在等待子进程返回控制权以退出。