In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Based on Centos6 installation, Centos 7 can be installed directly using yum
First, prepare mysql groups and users:
Groupadd-r-g 306 mysql
Useradd-r-g mysql-u 306 mysql
Prepare the package:
Tar-xzvf mariadb-5.5.46-linux-x86_64.tar.gz-C/usr/local/ decompress
Ln-s / usr/local/mariadb-5.5.46-linux-x86_64//usr/local/mysql / / facilitates future version upgrades
3. Modify file permissions:
Cd / usr/local/mysql/
Chown-R root:mysql. / *
4. Initialize the database:
1. Create a directory to store database data
Mkdir-p / mydata/data
Chown mysql:mysql / mydata/data/ modify permissions
two。 Initialize the database
/ usr/local/mysql/scripts/mysql_install_db-user=mysql-basedir=/usr/local/mysql--datadir=/mydata/data/
/ / use your own script to initialize the database and specify the user and database storage path
Prepare the configuration file:
Mkdir / etc/mysql
Cp/usr/local/mysql/support-files/my-large.cnf / etc/mysql/my.cnf
Vim / etc/mysql/my.cnf
6. Add environment variables, etc.
Vim / etc/profile.d/mysqld.sh
Source / etc/profile.d/mysqld.sh
Echo'/ usr/local/mysql/lib/' > / etc/ld.so.conf.d/mysqld.conf
Ldconfig
Ln-s / usr/local/mysql/include/mysql/ / usr/include/mysqld
Echo 'MANPATH / usr/local/mysql/man/' > > / etc/man.config
7. Start the service:
Cp / usr/local/mysql/support-files/mysql.server / etc/rc.d/init.d/mysqld
/ / use the service script provided by the package
Chkconfig-add mysqld
Chkconfig mysqld on / / set boot up
Service mysqld start / / start the service
8. Security initialization:
/ usr/local/mysql/bin/mysql_secure_installation
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.