In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief description of the detailed steps of installing mysql. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on the detailed steps of installing mysql can bring you some practical help.
Enter the / usr/local/src folder
two。 Download the installation package
Wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-i686-glibc23.tar.gz
3. Decompress tar zxvf mysql-5.1.73-linux-i686-glibc23.tar.gz
4. Create an account for mysql
Useradd-s / sbin/nologin-M mysql
-s:shell
-M: do not create a user directory
5. Move the extracted files to and rename them in the / usr/local/mysql directory
Mv mysql-5.1.73-linux-i686-glibc23 / usr/local/mysql
6. Enter / usr/local/mysql
7. Create a folder for the database and change permissions
Mkdir-p / data/mysql
Chown-R mysql / data/mysql
8. Compilation and installation
Initialize the database
Enter the directory of the database
-- users created by user
-- the path where datadir stores the database
Cd / usr/local/mysql
. / scripts/mysql_install_db-user=mysql-datadir=/data/mysql
9. Is there any error in the test echo $? Displaying 0 indicates that there are no errors
Use echo $? after 10.make&make install is completed. test
11. Put different files in different directories and enter the configuration file first.
Cd support-files/
twelve。 Copy the my-large.cnf file to / etc/my.cnf
Cp my-large.cnf / etc/my.cnf press y
13. Copy the mysql.server file to the / etc/init.d/mysqld directory
Cp mysql.server / etc/init.d/mysqld
Chmod 755 / etc/init.d/mysqld
14.vim! $can open the file you just copied
Modify the location of basedir=/usr/local/mysql-mysql
Datedir=/data/mysql-the location of the database
15. Add mysqld to system startup
Chkconfig-add mysqld
Open the mysqld.
Chkconfig mysqld on
Start mysqld
/ etc/init.d/mysqld start
16. Check the startup status of mysqld
Ps aux | grep mysqld
The following error prompt appears, the solution
Change / tmp permissions
Chmod 777 / tmp
The detailed steps of installing mysql will stop here. If you want to know about other related issues, you can continue to follow our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.