简体   繁体   English

无法在ubuntu上安装mysql服务器

[英]mysql-server not installing on ubuntu

I had a problem in mysql login so i tried to reinstall mysql-server But I am unable to reinstall 我在mysql登录时遇到问题,因此我尝试重新安装mysql-server,但无法重新安装

*Ubuntu Version 13.04 * Ubuntu 13.04版

I tried following command 我尝试了以下命令

   sudo apt-get update
   sudo apt-get install  mysql-server
   sudo service mysql restart

but it gives following errors 但它给出以下错误

root@bts23:~# sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5
  mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5
  mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 13 newly installed, 0 to remove and 1 not upgraded.
Need to get 26.1 MB/26.2 MB of archives.
After this operation, 91.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y


WARNING: The following packages cannot be authenticated!
  libaio1 mysql-common libmysqlclient18 libnet-daemon-perl libplrpc-perl libdbi-perl libdbd-mysql-perl mysql-client-core-5.5 libterm-readkey-perl
  mysql-client-5.5 mysql-server-core-5.5 mysql-server-5.5 mysql-server
Install these packages without verification [y/N]? y
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libaio1 i386 0.3.109-3
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-common all 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libmysqlclient18 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libdbi-perl i386 1.622-1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main libdbd-mysql-perl i386 4.021-1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-client-core-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-client-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server-core-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server-5.5 i386 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ raring/main mysql-server all 5.5.29-0ubuntu1
  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.109-3_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.29-0ubuntu1_all.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libd/libdbi-perl/libdbi-perl_1.622-1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libd/libdbd-mysql-perl/libdbd-mysql-perl_4.021-1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.29-0ubuntu1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-server_5.5.29-0ubuntu1_all.deb  404  Not Found [IP: 91.189.91.13 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

and when I try to restart/status after this it throw following error 当我尝试在此之后重新启动/状态时,它会引发以下错误

root@bts23:~# service mysql restart
mysql: unrecognized service
root@bts23:~# mysql
The program 'mysql' is currently not installed. You can install it by typing:
apt-get install mysql-client-core-5.5
root@bts23:~# 

If you have a look here http://in.archive.ubuntu.com/ubuntu/dists/ you can see there is no raring folder. 如果您在此处查看http://in.archive.ubuntu.com/ubuntu/dists/您会看到没有raring文件夹。 This is why you get a 404 error. 这就是为什么您会收到404错误的原因。

Support for Ubuntu 13.04 officially ended on January 27, 2014. If you still want to use this release try to update your sources files(/etc/apt/sources.list) with http://old-releases.ubuntu.com/ 对Ubuntu 13.04的支持已于2014年1月27日正式终止。如果您仍要使用此版本,请尝试使用http://old-releases.ubuntu.com/更新源文件(/etc/apt/sources.list)。

Change the Download from Server to Main Serve r in Software and Update Settings.Then follow these commands to remove the mysql server(if presents) completely and install it again.. 在“ 软件和更新设置”中,将“ 服务器下载”更改为“ 主要服务 ”。然后按照以下命令完全删除mysql服务器(如果存在)并重新安装。

sudo apt-get remove --purge mysql-server mysql-client mysql-common mysql-server-5.5 mysql-client-5.5 mysql-server-core-5.5 mysql-client-core-5.5
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql /etc/mysql
sudo deluser mysql
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot
sudo apt-get install mysql-server-5.6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM