MySQL Installation notes

Source: Internet
Author: User

MySQL Installation notes

After learning RedHat for a period of time, it is necessary to take notes. The following are the installation notes of MySQL,
I hope you will correct the error.

● Install MySQL
# Tar zxvf mysql-5.0.32.tar.gz
# Cd/tmp/mysql-5.0.32
# Groupadd MySQL
# Useradd mysql-G mysql-m-S/bin/false
#./Configure -- prefix =/opt/MySQL \ specify the installation directory
-- With-extra-charsets = gb2312 \ added support for gb2312 Chinese Characters

# Make
# Make install
# Scripts/mysql_install_db \ generate MySQL user database and table files
# Cp support-files/my-medium.cnf/etc/My. the CNF \ copy configuration file is available in three environments: large, medium, and small. Depending on the machine performance, if the load is heavy, you can modify the memory usage values of some variables.
# Cp support-files/MySQL. Server/etc/init. d/mysqld \ Copy mysqld file started
# Chmod 700/etc/init. d/mysqld
# Cd/OPT
# Chmod 750 mysql-R
# Chgrp MySQL mysql-R
# Chown MySQL/var-R
# Cd/opt/MySQL/libexec
# Cp mysqld. Old
# Strip mysqld
# Chkconfig -- add mysqld
# Chkconfig -- level 345 mysqld on
# Service mysqld start
# Netstat-atln
Check whether port 3306 is enabled. If mysqld cannot be started, check the error logs in/opt/MySQL/var. This is generally because the directory permission is not set.
# Ln-S/opt/MySQL/bin/MySQL/sbin/MySQL
# Ln-S/opt/MySQL/bin/mysqladmin/sbin/mysqladmin
# Mysqladmin-uroot password "youpassword" # Set the password of the root account
# Mysql-uroot-P
# Enter your password
Mysql>; use MySQL;
Mysql>; delete from user where Password = ""; # delete an empty password account used for anonymous local connection
Mysql>; flush privileges;
Mysql>; quit

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.