MySQL manual installation method and Chinese solution

Source: Internet
Author: User
Tags character set manual mysql manual

It took 1 days to successfully install the MySQL 5.0.27 ICC version on Debian Etch Linux and use JDBC to test Chinese success!

The key to the Chinese problem is to use all UTF-8 encoding, MySQL 5 release support UTF-8, but the default is Latin1,java in the internal use of all Unicode, so to ensure that the JSP page to UTF-8 encoding, JDBC driver with the official connector4j 5.0.4, in resin 3.1/spring 2.0/hibernate 3.2 Environment Test Chinese normal.

1. Download "mysql-standard-5.0.27-linux-i686-icc-glibc23.tar.gz" and recommend the ICC version, which is said to improve performance over GCC 10-20%

2. Copy to/usr/local/, extract: Tar zxvf mysql-standard-5.x....tar.gz

3. Add users and Groups MySQL:

Groupadd MySQL

useradd-g MySQL MySQL

4. Create a symbolic connection:/usr/local # ln-s mysql-standard-5.x ... MySQL

5. CD MySQL, current directory changed to/usr/local/mysql/

6. Run Footsteps Initialize the database:./scripts/mysql_install_db--user=mysql

7. Set Permissions:

/usr/local/mysql # Chown-r Root.

/usr/local/mysql # chown-r MySQL Data

/usr/local/mysql # chgrp-r MySQL

--------------------------------------------------------------------------------

8. Create and modify/etc/my.cnf as needed, refer to configuration:

[Mysqld]

# Set defaults to InnoDB table, support transactions:

Default-storage-engine=innodb

# Set the default character set UTF-8:

Character-set-server=utf8

Collation-server=utf8_general_ci

Default-character-set=utf8

# Disable BDB:

Skip-bdb

9. Start MySQL:

/usr/local/mysql/bin #/mysqld_safe--user=mysql &

10. Initialize Root password:

/usr/local/mysql/bin #/mysqladmin-u root-p password "password-of-root"

Enter Password: < Enter old password, press enter> directly

--------------------------------------------------------------------------------

11. Create a database with root login:

/usr/local/mysql #./mysql-u root-p

Enter Password:password-of-root

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.