In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "the process of compiling and installing mySQL5 under CentOS 6". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
First, prepare for the work
1. Install CentOS6 quickly and choose to minimize installation during installation.
2. Install the library files needed for compilation, and you can choose to do CD-ROM yum.
[root@admin share] # cd / media/
[root@admin media] # mkdir CentOS
[root@admin media] # mount / dev/cdrom / media/CentOS
[root@admin media] # cd / etc/yum.repos.d/
[root@admin yum.repos.d] # mv CentOS-Base.repo CentOS-Base.repo.bak
[root@admin yum.repos.d] # mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak
At this point, the yum made from CD is available.
[root@admin] # yum-- enablerepo=c6-media install ncurses* gcc* perl*-y
3. Get ready to install the package. (here is an example of mysql-5.0.56.tar.gz)
4, add mysql user
[root@admin ~] # groupadd mysql
[root@admin] # useradd-g mysql mysql-s / bin/nologin
Second, formal installation
1. [root@admin software] # tar zxvf mysql-5.0.56.tar.gz
2. [root@admin software] # cd mysql-5.0.56
3. [root@admin mysql-5.0.56] # / configure-- prefix=/usr/local/mysql-- localstatedir=/data/mysql-- enable-assembler-- enable-static-- with-mysqld-user=mysql-- with-big-tables-- enable-thread-safe-client-- enable-local-infile-- with-charset-utf8-- with-extra-charsets=all
4. [root@admin mysql-5.0.56] # make & & make install
5. [root@admin mysql-5.0.56] # cp support-files/my-medium.cnf / etc/my.cnf
6. [root@adim share] # cd / usr/local/mysql/
7. [root@admin mysql] # bin/mysql_install_db-- user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
Support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!
To do so, start the server, then issue the following commands:
/ usr/local/mysql/bin/mysqladmin-u root password' new-password'
/ usr/local/mysql/bin/mysqladmin-u root-h localhost.localdomain password' new-password'
Alternatively you can run:
/ usr/local/mysql/bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
Cd / usr/local/mysql; / usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd mysql-test; perl mysql-test-run.pl
Please report any problems with the / usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
Http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
8. [root@admin mysql] # chown-R mysql.mysql / data/mysql/
9. [root@admin mysql] # share/mysql/mysql.server start
Starting MySQL SUCCESS! #-> when you see this, you know that the installation is successful.
10. [root@admin mysql] # netstat-tunlp | grep mysql
Tcp 0 0 0.0.0.0 3306 0.0.0.015 * LISTEN 13193/mysqld
three。 Houxu work
1. [root@admin] # ln-s / usr/local/mysql/share/mysql/mysql.server / etc/init.d/mysqld
2. [root@admin] # ln-s / usr/local/mysql/bin/mysql / usr/sbin/mysql
3. [root@admin] # ln-s / usr/local/mysql/bin/mysqladmin / usr/sbin/mysqladmin
4. [root@admin] # ln-s / usr/local/mysql/bin/mysqldump / usr/sbin/mysqldump
5. [root@admin] # mysql-uroot-p
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 2
Server version: 5.0.56-log Source distribution
Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.
Mysql >
This is the end of the process of compiling and installing mySQL5 under CentOS 6. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.