Linux MySQL installation issues

Source: Internet
Author: User

1, RPM-QA | grep MySQL//first check if MySQL 2 is installed, if installed, uninstall rpm-e MySQL 3\ http://dev.mysql.com/downloads/mysql/4, 5, Groupadd MySQL//CAN To see if this user group exists more/etc/group more/etc/passwd6\ useradd-g mysql MySQL Cmake-dcmake_install_prefix=/usr/local/mys QL \
-dmysql_unix_addr=/tmp/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-DWITH_EXTRA_CHARSETS:STRING=UTF8,GBK \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-denabled_local_infile=1 \
-dmysql_datadir=/var/mysql/data \
-dmysql_user=mysql

Make
Make install 7\ CD scripts/mysql_install_db initialize files after installing MySQL database scripts/mysql_install_db--user=mysql installation problems5.5.12mysql in Installation
EXECUTE AS 5.1
#/usr/local/mysql/scripts/mysql_install_db--user=mysql
Error occurred

FATAL error:could not find./bin/my_print_defaults

If you compiled from source, you need to run ' make install ' to
Copy the software into the correct location ready for operation.

If you is using a binary release, you must either is at the top
Level of the extracted archive, or pass the--BASEDIR option

Solve


/usr/local/mysql/scripts/mysql_install_db--defaults-file=/etc/my.cnf--basedir=/usr/local/mysql--datadir=/mnt/ MySQL--user=mysql
make
089 makeinstall
090
091 完成后进入MYSQL安装目录
092
093 cd/mysql/mysqldir
094 cpsupport-files/my-huge.cnf /etc/my.cnf
095 vi/etc/my.cnf
096
097 将数据目录和套接字文件修改为实际值.
098
099 修改权限
100
101 chownmysql:mysql /etc/my.cnf
102 chown-R mysql:mysql /mysql/mysqldir
103
104 切换用户进入安装目录
105
106 su- mysql
107 cd/mysql/mysqldir
108 cpscripts/mysql_install_db .
109 ./mysql_install_db
110
111 启动MYSQL
112
113 bin/mysqld_safe &
114

Linux MySQL installation issues

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.