sudo apt-get install mysql-server失败

我来自全新安装的Ubuntu服务器9.10,并试图通过使用“sudo apt-get mysql-server”来安装mysql-server

我得到以下错误:
dan @ dev:〜$ sudo apt-get install mysql-server
丹的[sudo]密码:
正在读取软件包列表…完成
build立依赖关系树
阅读状态信息…完成
以下额外的软件包将被安装:
libdbd-mysql-perl libdbi-perl libhtml-template-perl
libnet-daemon-perl libplrpc-perl mysql-client-5.1
的MySQL – 服务器 – 5.1
build议套餐:
dbishell libipc-sharedcache-perl tinyca
以下新软件包将被安装:
libdbd-mysql-perl libdbi-perl libhtml-template-perl
libnet-daemon-perl libplrpc-perl mysql-client-5.1
mysql-server mysql-server-5.1
0升级,8新安装,0删除和0未升级。 需要得到16.5MB的档案。
完成此操作后,将使用39.0MB的额外磁盘空间。
你想继续[Y / N]吗? ÿ
获取:1 http://us.archive.ubuntu.com karmic /主libnet-daemon-perl 0.43-1 [46.9kB]
获取:2 http://us.archive.ubuntu.com karmic / main libplrpc-perl 0.2020-2 [36.0kB]
获取:3 http://us.archive.ubuntu.com karmic / main libdbi-perl 1.609-1 [800kB]
获取:4 http://us.archive.ubuntu.com karmic / main libdbd-mysql-perl 4.011-1ubuntu1 [136kB]
得到:5 http://us.archive.ubuntu.com karmic-updates / main mysql-client-5.1 5.1.37- 1ubuntu5.1 [8,202kB]
获取:6 http://us.archive.ubuntu.com karmic-updates / main mysql-server-5.1 5.1.37-1ubuntu5.1 [7,186kB]
获取:7 http://us.archive.ubuntu.com karmic / main libhtml-template-perl 2.9-1 [65.8kB]
获取:8 http://us.archive.ubuntu.com karmic-updates /主mysql-server 5.1.37-1ubuntu5.1 [64.3kB]
在1分34秒(175kB / s)中获取16.5MB
预先configuration软件包…
select以前取消选中的软件包libnet-daemon-perl。
(正在读取数据库… 123083当前安装的文件和目录。)
解压libnet-daemon-perl(from … / libnet-daemon-perl_0.43-1_all.deb)…
select以前取消select的软件包libplrpc-perl。
解压libplrpc-perl(从… / libplrpc-perl_0.2020-2_all.deb)…
select以前取消select的软件包libdbi-perl。
解压libdbi-perl(从… / libdbi-perl_1.609-1_i386.deb)…
select以前取消select的软件包libdbd-mysql-perl。
解压缩libdbd-mysql-perl(从… / libdbd-mysql-perl_4.011-1ubuntu1_i386.deb)…
select以前取消select的包mysql-client-5.1。
解压mysql-client-5.1(从… / mysql-client-5.1_5.1.37-1ubuntu5.1_i386.deb)…
select以前取消select的软件包mysql-server-5.1。
解压mysql-server-5.1(从… / mysql-server-5.1_5.1.37-1ubuntu5.1_i386.deb)…
select以前取消select的软件包libhtml-template-perl。 解压缩libhtml-template-perl(从… / libhtml-template-perl_2.9-1_all.deb)…
select以前取消select的包mysql-server。
解压mysql-server(从… / mysql-server_5.1.37-1ubuntu5.1_all.deb)…
正在处理man-db的触发器…
正在处理ureadahead的触发器…
ureadahead将在下次重新启动时重新configuration
设置libnet-daemon-perl(0.43-1)…
设置libplrpc-perl(0.2020-2)…
设置libdbi-perl(1.609-1)…
设置libdbd-mysql-perl(4.011-1ubuntu1)…
设置mysql-client-5.1(5.1.37-1ubuntu5.1)…

Setting up mysql-server-5.1 (5.1.37-1ubuntu5.1) ... * Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [fail] invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing mysql-server-5.1 (--configure): subprocess installed post-installation script returned error exit status 1 Setting up libhtml-template-perl (2.9-1) ... dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.1; however: Package mysql-server-5.1 is not configured yet. dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: mysql-server-5.1 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) 

我错过了什么?

[更新] mysqld返回:

 dan@dev:~$ sudo mysqld [sudo] password for dan: 100220 12:18:17 [Note] Plugin 'FEDERATED' is disabled. InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. 100220 12:18:17 InnoDB: Retrying to lock the first data file InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process 

这持续了一段时间…

 InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. ^[[BInnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. 100220 12:19:57 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 100220 12:19:57 InnoDB: Operating system error number 11 in a file operation. InnoDB: Error number 11 means 'Resource temporarily unavailable'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! 100220 12:19:57 [ERROR] Plugin 'InnoDB' init function returned error. 100220 12:19:57 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 100220 12:19:57 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 100220 12:19:57 [ERROR] Do you already have another mysqld server running on port: 3306 ? 100220 12:19:57 [ERROR] Aborting 100220 12:19:57 [Warning] Forcing shutdown of 1 plugins 100220 12:19:57 [Note] mysqld: Shutdown complete 

我怎样才能检查使用端口是什么进程:3306?

[更新]: sudo netstat -anp | grep LISTEN sudo netstat -anp | grep LISTEN
回报

 dan@dev:~$ sudo netstat -anp | grep LISTEN [sudo] password for dan: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1372/master tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 4391/mysqld tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1409/cupsd tcp6 0 0 ::1:631 :::* LISTEN 1409/cupsd 

[更多更新]:如果这有所作为,我可以login到MySQL

  • 无法通过ssh隧道连接到AWS上的MySQL
  • MySQL不会在旋转后将错误logging到新文件中?
  • 百胜:php55w-与php-common-5.4常见冲突
  • MySQL将数据库文件存储在OS X的哪里?
  • 从MySQL服务器迁移到MariaDB
  • 你有没有注意到通过编译Apache和MySQL来提高性能?
  • 3 Solutions collect form web for “sudo apt-get install mysql-server失败”

    在这种情况下,我想尝试一下:

    尝试重新安装mysql-server-5.1:

     sudo apt-get install --reinstall mysql-server-5.1 

    尝试重新安装mysql-server:

     sudo apt-get install --reinstall mysql-server 

    尝试重新configurationmysql-server-5.1并重新尝试重新安装:

     sudo dpkg-reconfigure mysql-server-5.1 sudo apt-get install --reinstall mysql-server 

    在安装软件包后, mysql-server-5.1软件包试图启动MySQL,失败。 你需要做的第一件事是干净地完成安装过程。 做这件事有很多种方法:

    • 修复你的MySQLconfiguration,检查/etc/init.d/mysql-server工作正常,然后启动dpkg --configure -a来完成安装过程;
    • 或编辑/var/lib/dpkg/info/mysql-server-5.1.postinst并删除它启动服务器的部分(可能调用/etc/init.d/mysql-server start ),然后启动dpkg --configure -a完成安装过程,然后修复您的configuration。

    试试lsof -i @localhost:3306 。 你可能需要安装lsof,但它是一个很棒的工具,可以随时使用。

    服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器.