installation of the lamp MySQL

Source: Internet
Author: User

1. Installing gcc-c++

Yum-y Install gcc-c++

2. Install upload download

Yum Install Lrzsz

3. uploading cmake and mysql5.5

Rz

4. Unzip the cmakeand enter the extracted directory

Tar zxvf

Cd

5. compiling the installation

./configure

Make && make install

6. Installing dependent packages

Yum Install Ncurses-devel-y

7. unzip MySQL and go to mysql directory

8. Create users and Groups

Groupadd MySQL

Useradd mysql-s/sbin/nologin-m-G MySQL

225pxake

CMake.-dcmake_install_prefix=/application/mysql-5.5.32 \

-dmysql_datadir=/application/mysql-5.5.32/data\

-dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock\

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \

-denabled_local_infile=on \

-dwith_innobase_storage_engine=1 \

-dwith_federated_storage_engine=1 \

-dwith_blackhole_storage_engine=1 \

-dwithout_example_storage_engine=1 \

-dwithout_partition_storage_engine=1 \

-dwith_fast_mutexes=1 \

-dwith_zlib=bundled \

-denabled_local_infile=1 \

-dwith_readline=1 \

-dwith_embedded_server=1 \

-dwith_debug=0

Ten. Make && Makeinstall

Move Files

CP SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF

Configuration Files

Echo ' Exportpath=/application/mysql/bin: $PATH ' >>/etc/profile

Source/etc/profile

Echo $PATH

the Data folder and/ tmp are authorized

Chown-r mysql.mysql/application/mysql/data/

Chmod-r 1777/tmp/

Go to the Script initialization database in the installation directory

./mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/--user=mysql

There are two of OK, you can do it.


Enter the Support-files directory of the source code and copy the Mysql.server to the specified location /etc/init.d/

Cp/application/tools/mysql-5.5.32/support-files/mysql.server/etc/init.d/mysqld

give mysqld authorization .

chmod +x/etc/init.d/mysqld

Open MySQL

/etc/init.d/mysqld start

Delete Redundant users

Delete from Mysql.user wherehost= ' Localhost.localdomain ';

Or

Drop user ' root ' @nfsclient;

Delete Redundant database test

Drop DATABASE Test


/////////////////////////////////////////////////////////////////////////////////////////////////////


ERROR1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)

To enter a password

ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)

Password error

Modify password error such as, please modify the character set,/etc/sysconfig/i18n to change the value of LANG to

Lang= "en_US. UTF-8 "




installation of the lamp MySQL

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.