MySQL error caused by Ubuntu upgrade to 12.04

Source: Internet
Author: User

Upgrading MySQL to 5.5.22 in Ubuntu 12.04 causes the original MySQL loading to fail.

Solution:

1. completely uninstall the original MySQL

  1. Sudo apt-get remove mysql-server
  2. Sudo apt-get autoremove -- purge mysql-server
  3. Sudo apt-get remove mysql-common (this step is important)
  4. Dpkg-l | grep ^ rc | awk'{Print $2 }'| Sudo xargs dpkg-P

2. reinstall mysql (restart before installation)

Sudo apt-get install mysql-server
Sudo apt-get install mysql-workbench (the original client cannot be used)

Run the following command to check whether the installation is successful:

Sudo netstat-tap | grep mysql

3. mysql2 in the original gem needs to be re-compiled and installed

  1. Gem uninstall mysql2
  2. Gem install mysql2

4. the following error may occur during mysql2 installation:

  1. Gem: Installer: ExtensionBuildError: ERROR: Failed to build gem native extension.
  2. /Homexxx/. rbenv/versions/1.9.3-p125/bin/ruby extconf. rb
  3. CheckingForRb_thread_blocking_region ()... yes
  4. CheckingForRb_wait_for_single_fd ()... yes
  5. CheckingForMysql_query ()In-Lmysqlclient... no
  6. CheckingForMain ()In-Lm... yes
  7. CheckingForMysql_query ()In-Lmysqlclient... no
  8. CheckingForMain ()In-Lz... yes
  9. CheckingForMysql_query ()In-Lmysqlclient... no
  10. CheckingForMain ()In-Lsocket... no
  11. CheckingForMysql_query ()In-Lmysqlclient... no
  12. CheckingForMain ()In-Lnsl... yes
  13. CheckingForMysql_query ()In-Lmysqlclient... no
  14. CheckingForMain ()In-Lmygcc... no
  15. CheckingForMysql_query ()In-Lmysqlclient... no
  16. * ** Extconf. rb failed ***
  17. CocouldNotCreate Makefile due to some reason, probably lack
  18. Necessary librariesAnd/OrHeaders. Check the mkmf. log fileForMore
  19. Details. You may need configuration options.

Solution:

  1. Sudo apt-get install libmysql-ruby
  2. Sudo apt-get install libmysqlclient-dev
  3. Gem install mysql

For more information about Ubuntu, see Ubuntu special page http://www.bkjia.com/topicnews.aspx? Tid = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.