Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Compile and install Mysql5.5 database software

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Preparation environment: Centos6.5 (6 series operating system)

[root@localhost ~] # yum-y install gcc gcc-c++ ncurses-devel libxml2-devel zlib-devel pcre-devel

[root@localhost ~] # tar zxvf bison-2.5.tar.gz

[root@localhost ~] # cd bison-2.5

[root@localhost] # / configure & & make & & make install

[root@localhost ~] # tar zxvf cmake-2.8.7.tar.gz

[root@localhost ~] # cd cmake-2.8.7

[root@localhost] # / bootstrap & & gmake & & gmake install

[root@localhost ~] # tar zxvf mysql-5.5.22.tar.gz

[root@localhost ~] # cd mysql-5.5.22

[root@localhost ~] # useradd mysql

[root@localhost] # cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all-DSYSCONFDIR=/etc/ & & make & & make install

Parameter notes: installation directory, default encoding, check character set, install all extended character set, configuration file directory

[root@localhost] # chown-R: mysql / usr/local/mysql

[root@localhost ~] # cd / usr/local/mysql/support-files

[root@localhost ~] # cp my-medium.cnf / etc/my.cnf

[root@localhost ~] # cp mysql.server / etc/init.d/mysqld

[root@localhost ~] # cd.. / scripts/

The following actions will initialize the mysql, specify the base directory, store the data directory, and run the user

[root@localhost] # / mysql_install_db-basedir=/usr/local/mysql-datadir=/usr/local/mysql/data-user=mysql

[root@localhost ~] # / etc/init.d/mysqld start

[root@localhost ~] # echo "PATH=$PATH:/usr/local/mysql/bin" > > / etc/profile

[root@localhost ~] # source / etc/profile

[root@localhost ~] # mysqladmin-u root password 'redhat' sets the mysql running account and password. This root is not the root of the system user.

[root@localhost] # mysql-u root-p

Enter password:

OK, installation complete

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report