How to upgrade MYSQL client from freebsd

Source: Internet
Author: User
This article will introduce freebsd to you in detail how to upgrade mysqlclient. If you need it, please refer to it. I recommend that you refer to the second method in this article.

This article will introduce freebsd to you in detail the mysql client upgrade method. If you need it, you can refer to it. I recommend that you refer to the second method in this article.

Mysql serve is 5.1.x, and the client is 5.0.x. When it is used, there is always a prompt saying that the version does not match and it feels uncomfortable.
Use Ports to upgrade the client. If not, an error is returned. If 5.1 and 5.0 conflict with each other, you can only delete them first.
With portmaster-o databases/mysql51-client mysql-client-5.0.89
No.
Run the command after export CONFLICTS =. Read

The Code is as follows:

Pkg_info mysql *
Yes
Required:
Php5-mysql-5.2.12
Php5-mysqli-5.2.12
Because the website was still running, I did not dare to rush.
This day, when the number of people on the website is small
Delete old package
# Pkg_delete-f mysql-client-5.0.89
To the mysql5.1 client Directory
# Cd/usr/ports/database/mysql51-client
Installation
# Make install clean


# Mysql-V
Mysql Ver 14.14 Distrib 5.1.42, for portbld-freebsd8.0 (amd64) using 5.2
Upgrade two dependent php components with portmaster
# Portmaster php5-mysql php5-mysqli

Wait
.
.
Restart.


Method 2


First, upgrade the client.

The Code is as follows:

# Portmaster-o/usr/ports/databases/mysql55-client/usr/ports/databases/mysql51-client

This step will install cmake ~

Upgrade the server (you need to re-specify the original character set)

The Code is as follows:

# Portmaster-o databases/mysql55-server databases/mysql51-server

Because some of the newly upgraded mysql files have only the read permission by default, here we modify the execution File Permission and the directory permission for mysql to store data as writable.

The Code is as follows:

# Mysql_install_db
# Chown-R mysql: mysql/var/db/mysql

Restart the service

The Code is as follows:

#/Usr/local/bin/mysqld_safe &

Next we will upgrade

The Code is as follows:

# Mysql_upgrade-u root-p pass

Modify configuration file

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

Some character sets are not supported during the upgrade, such as gbk and gb2312. Please re-specify the character set when upgrading the server.

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.