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

Mysql database simple installation (binary)

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Binary installation: [root@lufengcentos ~] # mkdir / home/lufeng/tools-p [root@lufengcentos ~] # cd / home/lufeng/tools [root@lufengcentos tools] # rz [root@lufengcentos tools] # tar xf mysql-5.5.49-linux2.6-x86_64.tar.gz [root@lufengcentos tools] # mkdir-p / application/mysql-5.5.49 [root@lufengcentos tools] # mv mysql-5.5.49-linux2.6-x86_64 / application/mysql -5.5.49 create mysql users | Group [root@lufengcentos tools] # groupadd mysql [root@lufengcentos tools] # useradd mysql- g mysql- s / sbin/nologin-M initialization configuration file [root@lufengcentos tools] # ln-s / application/mysql-5.5.49/ / application/mysql [root@lufengcentos tools] # cd / application/mysql [root@lufengcentos mysql] # cp support-files/my-small.cnf / etc/my.cnf initialization database file [root] @ lufengcentos mysql] # mkdir-p / application/mysql/data [root@lufengcentos mysql] # chown-R mysql.mysql / application/mysql/ [root@lufengcentos mysql] # / application/mysql/scripts/mysql_install_db-- basedir=/application//mysql-- datadir=/application/mysql/data-- user=mysql configuration and launch MySQL [root @ lufengcentos mysql] # cp support-files/mysql.server / etc/init.d/mysqld [root@lufengcentos mysql] # chmod + x / etc/init.d/mysqldroot@lufengcentos Mysql] # sed-I's etc/init.d/mysqld root@lufengcentos mysql root@lufengcentos mysql # / etc/init.d/mysqld startStarting MySQL... SUCCESS! [root@lufengcentos mysql] # netstat-lntup | grep mysqltcp 0 0.0.0.0lntup 3306 0.0.0.0 LISTEN 2951/mysqld configure the global usage path [root@Mysql-server ~] # echo 'export PATH=/application/mysql/bin:$PATH' > > / etc/profile [root@Mysql-server ~] # tail-1 / etc/profileexport PATH=/application/mysql/bin : $path [root @ Mysql-server ~] # echo $PATH/application/mysql/bin:/applicaion/mysql/bin:/applicaion/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin Security configuration: [root@Mysql-server ~] # mysqladmin-u root password '199429' [root@Mysql-server ~] # mysqlERROR 1045 (28000): Access denied for user' root'@'localhost' (using password) : NO) [root@Mysql-server ~] # mysql-uroot-p Delete redundant users: +-+-+ | user | host | +-+-+ | root | 127.0.0.1 | | root | localhost | +-+-+

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: 215

*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