FreeBSD update MySQL Client method introduction

Source: Internet
Author: User
Tags character set mysql client file permissions

MySQL serve is 5.1.x, the client is 5.0.x, with phpMyAdmin, there is always a hint that the version does not match, feeling bad.
Use the Ports method to upgrade the client, no, no error. Said 5.1 and 5.0 conflict, can only be deleted first.
Portmaster-o databases/mysql51-client mysql-client-5.0.89
is not a good use.
Plus export conflicts= "after the execution, or not. Looked at the

The code is as follows Copy Code

Pkg_info mysql*
Yes
Required by:
php5-mysql-5.2.12
php5-mysqli-5.2.12
Because also ran the website, did not dare to act rashly.
This day when the site is less than the time, a dry
Delete the old package
#pkg_delete-F mysql-client-5.0.89
Directory to mysql5.1 Client
#cd/usr/ports/databases/mysql51-client
Loaded
#make Install clean


#mysql-V
MySQL Ver 14.14 distrib 5.1.42, for portbld-freebsd8.0 (AMD64) using 5.2
Upgrading 2 of dependent PHP components with Portmaster
#portmaster Php5-mysql Php5-mysqli

Wait


Restart Apache, OK.


Method Two


Upgrade the client first

The code is as follows Copy Code

#portmaster-O/usr/ports/databases/mysql55-client/usr/ports/databases/mysql51-client

This step will install the cmake~

Upgrade the server side again (you will need to reassign the original character set)

The code is as follows Copy Code

#portmaster-O databases/mysql55-server databases/mysql51-server

Because the newly upgraded MySQL partial file permission defaults to only read permission, so modify this here to execute file permissions and MySQL store data directory permissions are writable

The code is as follows Copy Code

#mysql_install_db
#chown-R Mysql:mysql/var/db/mysql

Restart Service

The code is as follows Copy Code

#/usr/local/bin/mysqld_safe &

Below we upgrade

The code is as follows Copy Code

#mysql_upgrade-u root-p password

Modify configuration file

Re-copy the configuration file in the/usr/local/share/mysql or modify/etc/my.cnf to modify the previous skip-locking (which is invalid) to skip-external-locking.

During the upgrade, some character set databases were found to be unsupported, such as gbk,gb2312, please reassign the character set when performing the upgrade server side

Related Article

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.