In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Install MySQL1. Uninstall the old version
Use the following command to check if MySQL Server is installed. What we found is this:
[root@localhost ~] # rpm-qa | grep mysqlmysql-libs-5.1.73-7.el6.x86_64
If so, uninstall it with the following command
Rpm-e-nodeps mysql_libs2. Install MySQL
Install the packages needed to compile the code
Yum-y install make gcc-c++ cmake bison-devel ncurses-devel
Unzipped package mysql-5.6.14.tar.gz password: nu20
Tar-zxvf mysql-5.6.14.tar.gzcd mysql-5.6.14
Compilation and installation
Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/usr/local/mysql/data-DSYSCONFDIR=/etc-DWITH_MYISAM_STORAGE_ENGINE=1-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_MEMORY_STORAGE_ENGINE=1-DWITH_READLINE=1-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock-DMYSQL_TCP_PORT=3306-DENABLED_LOCAL_INFILE=1-DWITH_PARTITION_STORAGE_ENGINE=1-DEXTRA_CHARSETS=all-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci
Compile and install
Make & & make install
The whole process takes more than 20 minutes and a half hour.
3. Configure MySQL3.1 to create mysql groups and accounts groupadd mysqluseradd-g mysql mysql3.2 modify / usr/local/mysql permissions chown-R mysql:mysql / usr/local/mysql3.3 initialization configuration, enter the installation path (executing the following instructions), execute the initialization configuration script Create the database and table cd / usr/local/mysqlscripts/mysql_install_db that comes with the system-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data-- user=mysql3.4 backup my.cnf
We will use the / usr/local/mysql/my.cnf configuration file in the future. To prevent interference, we will rename the my.cnf under etc.
Mv / etc/my.cnf / etc/my.cnf.bak4. Start and use MySQL4.1 to add services, copy service scripts to the init.d directory, and set boot
Execute under / usr/local/mysql
Cp support-files/mysql.server / etc/init.d/mysqldchkconfig mysqld onservice mysqld start 4.2 launch the mysql client cd / usr/local/mysql/bin./mysql-uroot-p
After installation, the root user password defaults to empty
4.3 mysql commands are added to the path path
Modify / etc/profile file, add
PATH=$PATH:/usr/local/mysql/bin
Execute the source command to make the configuration effective
Any directory under the source / etc/profile4.4 terminal uses the mysql command mysql-u root-p
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.