In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Experimental environment
Install mysql on a Linux system
II. Operation script
1. CD mount
Cd / mnt
Ls
Mount / dev/cdrom / mnt
two。 Establish yum warehouse
Cd / etc/yum.repos.d/
Vim aaa.repo
[aaa]
Name=test
Baseurl= file:///mnt
Enabled=1
Gpgcheck=0
Ls
Rm-rf rhel-source.repo
Yum list
3. Shared mount
Mkdir / opt/lamp
Smbclient-L / / 192.168.119.2 /
Mount.cifs / / 192.168.119.2/john / opt/lamp
4. Decompression of files
Cd / opt/lamp
Tar zxvf mysql-5.5.24.tar.gz-C / opt
5. Install the environment package
Yum install gcc gcc-c++ make cmake-y
Rpm-ivh / mnt/Packages/ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
Rpm-ivh / mnt/Packages/bison-2.4.1-5.el6.x86_64.rpm
Rpm-ivh / mnt/Packages/libaio-devel-0.3.107-10.el6.x86_64.rpm
6. Add mysql users and join the mysql group
Useradd-s / sbin/nologin mysql
Mkdir-p / usr/local/mysql
7. Compilation and installation
Cd / opt/mysql-5.5.24
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql
-DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DWITH_EXTRA_CHARSETS=all
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MEMORY_STORAGE_ENGINE=1
-DWITH_READLINE=1
-DENABLED_LOCAL_INFILE=1
-DMYSQL_DATADIR=/home/mysql
-DMYSQL_USER=mysql
-DMYSQL_TCP_PORT=3306
Make & & make install
8. Recursive replication
Chown-R mysql.mysql / usr/local/mysql
9. Refresh when powered on
Export PATH=$PATH:/usr/local/mysql/bin/
10. Copy Profil
Cp support-files/my-medium.cnf / etc/my.cnf
Cp support-files/mysql.server / etc/init.d/mysqld
11. Increase file execution permissions
Chmod 755 / etc/init.d/mysqld
twelve。 Add and start the mysqld service
Chkconfig-add / etc/init.d/mysqld
Chkconfig mysqld-level 35 on
13. Initialize the database
/ usr/local/mysql/scripts/mysql_install_db\
-- user=mysql\
-- ldata=/var/lib/mysql\
-- basedir=/usr/local/mysql\
-- datadir=/home/mysql
14. Establish a soft link
Ln-s / var/lib/mysql/mysql.sock / home/mysql/mysql.sock
15. Modify the configuration file
Vim / etc/init.d/mysqld
Basedir=/usr/local/mysql
Datadir=/home/mysql
16. Open the mysqld service and verify
Service mysqld start
Netstat-tnl 3306
Cd / opt/mysql-5.5.24
Mysql
Show databases
Third, the diagram of the experimental steps
4. Experimental results
The results show that mysql is installed successfully, as shown in the following figure
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.