Install MySQL5.0.18 (source package) in Linux)

Source: Internet
Author: User

All these operations are performed in Linux and the root permission is required.

Installation start:

Shell> groupadd mysql

Shell> useradd-g mysql

Shell> gunzip | mysql-VERSION.tar.gz | tar-xvf-

Shell> cd mysql-VERSION

Shell>./configure -- prefix =/usr/local/mysql -- with-charset = gb2312

Shell> make

Shell> make install

Shells> cp support-files/my-medium.cnf/etc/my. cnf

Shell> cd/usr/local/mysql

Shell> bin/mysql_install_db -- user = mysql

Shell> chown-R root.

Shell> chown-R mysql var

Shell> chgrp-R mysql.

Shell> bin/mysqld_safe -- user = mysql &

(It is important to start with a mysql user .)

Shell> bin/mysql-uroot-p

(Enter the password. The default password is blank. Press enter)

Shell> Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)

If the above prompt is displayed, it indicates that the mysql service is not started properly. Because the mysql service is started, the mysql. sock file is automatically generated.

Shell> killall mysql

Kill all mysql processes and restart them.

Shell> bin/mysql_install_db -- user = mysql

Restart

Shell> bin/mysql-uroot-p

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.